43 lines
1.8 KiB
C#
43 lines
1.8 KiB
C#
using System.Globalization;
|
|
|
|
namespace StellaOps.Bench.LinkNotMerge;
|
|
|
|
internal sealed record ScenarioResult(
|
|
string Id,
|
|
string Label,
|
|
int Iterations,
|
|
int ObservationCount,
|
|
int AliasGroups,
|
|
int LinksetCount,
|
|
DurationStatistics TotalStatistics,
|
|
DurationStatistics InsertStatistics,
|
|
DurationStatistics CorrelationStatistics,
|
|
ThroughputStatistics TotalThroughputStatistics,
|
|
ThroughputStatistics InsertThroughputStatistics,
|
|
AllocationStatistics AllocationStatistics,
|
|
double? ThresholdMs,
|
|
double? MinThroughputThresholdPerSecond,
|
|
double? MinInsertThroughputThresholdPerSecond,
|
|
double? MaxAllocatedThresholdMb)
|
|
{
|
|
public string IdColumn => Id.Length <= 28 ? Id.PadRight(28) : Id[..28];
|
|
|
|
public string ObservationsColumn => ObservationCount.ToString("N0", CultureInfo.InvariantCulture).PadLeft(12);
|
|
|
|
public string AliasColumn => AliasGroups.ToString("N0", CultureInfo.InvariantCulture).PadLeft(8);
|
|
|
|
public string LinksetColumn => LinksetCount.ToString("N0", CultureInfo.InvariantCulture).PadLeft(9);
|
|
|
|
public string TotalMeanColumn => TotalStatistics.MeanMs.ToString("F2", CultureInfo.InvariantCulture).PadLeft(10);
|
|
|
|
public string CorrelationMeanColumn => CorrelationStatistics.MeanMs.ToString("F2", CultureInfo.InvariantCulture).PadLeft(10);
|
|
|
|
public string InsertMeanColumn => InsertStatistics.MeanMs.ToString("F2", CultureInfo.InvariantCulture).PadLeft(10);
|
|
|
|
public string ThroughputColumn => (TotalThroughputStatistics.MinPerSecond / 1_000d).ToString("F2", CultureInfo.InvariantCulture).PadLeft(11);
|
|
|
|
public string InsertThroughputColumn => (InsertThroughputStatistics.MinPerSecond / 1_000d).ToString("F2", CultureInfo.InvariantCulture).PadLeft(11);
|
|
|
|
public string AllocatedColumn => AllocationStatistics.MaxAllocatedMb.ToString("F2", CultureInfo.InvariantCulture).PadLeft(9);
|
|
}
|