@@ -28,59 +28,59 @@ private enum Priority
28
28
Additional
29
29
}
30
30
31
- public static readonly IStatisticColumn Mean = new StatisticColumn ( " Mean" , "Arithmetic mean of all measurements" ,
31
+ public static readonly IStatisticColumn Mean = new StatisticColumn ( Column . Mean , "Arithmetic mean of all measurements" ,
32
32
s => s . Mean , Priority . Main ) ;
33
33
34
- public static readonly IColumn StdErr = new StatisticColumn ( " StdErr" , "Standard error of all measurements" ,
34
+ public static readonly IColumn StdErr = new StatisticColumn ( Column . StdErr , "Standard error of all measurements" ,
35
35
s => s . StandardError , Priority . Main , parentColumn : Mean ) ;
36
36
37
- public static readonly IColumn StdDev = new StatisticColumn ( " StdDev" , "Standard deviation of all measurements" ,
37
+ public static readonly IColumn StdDev = new StatisticColumn ( Column . StdDev , "Standard deviation of all measurements" ,
38
38
s => s . StandardDeviation , Priority . Main , parentColumn : Mean ) ;
39
39
40
- public static readonly IColumn Error = new StatisticColumn ( " Error" , "Half of 99.9% confidence interval" ,
40
+ public static readonly IColumn Error = new StatisticColumn ( Column . Error , "Half of 99.9% confidence interval" ,
41
41
s => new ConfidenceInterval ( s . Mean , s . StandardError , s . N , ConfidenceLevel . L999 ) . Margin , Priority . Main , parentColumn : Mean ) ;
42
42
43
- public static readonly IColumn OperationsPerSecond = new StatisticColumn ( "Op/s" , "Operation per second" ,
43
+ public static readonly IColumn OperationsPerSecond = new StatisticColumn ( Column . OperationPerSecond , "Operation per second" ,
44
44
s => 1.0 * 1000 * 1000 * 1000 / s . Mean , Priority . Additional , UnitType . Dimensionless ) ;
45
45
46
- public static readonly IColumn Min = new StatisticColumn ( " Min" , "Minimum" ,
46
+ public static readonly IColumn Min = new StatisticColumn ( Column . Min , "Minimum" ,
47
47
s => s . Min , Priority . Quartile ) ;
48
48
49
- public static readonly IColumn Q1 = new StatisticColumn ( "Q1" , "Quartile 1 (25th percentile)" ,
49
+ public static readonly IColumn Q1 = new StatisticColumn ( Column . Q1 , "Quartile 1 (25th percentile)" ,
50
50
s => s . Q1 , Priority . Quartile ) ;
51
51
52
- public static readonly IColumn Median = new StatisticColumn ( " Median" , "Value separating the higher half of all measurements (50th percentile)" ,
52
+ public static readonly IColumn Median = new StatisticColumn ( Column . Median , "Value separating the higher half of all measurements (50th percentile)" ,
53
53
s => s . Median , Priority . Quartile ) ;
54
54
55
- public static readonly IColumn Q3 = new StatisticColumn ( "Q3" , "Quartile 3 (75th percentile)" ,
55
+ public static readonly IColumn Q3 = new StatisticColumn ( Column . Q3 , "Quartile 3 (75th percentile)" ,
56
56
s => s . Q3 , Priority . Quartile ) ;
57
57
58
- public static readonly IColumn Max = new StatisticColumn ( " Max" , "Maximum" , s => s . Max , Priority . Quartile ) ;
58
+ public static readonly IColumn Max = new StatisticColumn ( Column . Max , "Maximum" , s => s . Max , Priority . Quartile ) ;
59
59
60
- public static readonly IColumn Skewness = new StatisticColumn ( " Skewness" , "Measure of the asymmetry (third standardized moment)" ,
60
+ public static readonly IColumn Skewness = new StatisticColumn ( Column . Skewness , "Measure of the asymmetry (third standardized moment)" ,
61
61
s => s . Skewness , Priority . Additional , UnitType . Dimensionless ) ;
62
62
63
- public static readonly IColumn Kurtosis = new StatisticColumn ( " Kurtosis" , "Measure of the tailedness ( fourth standardized moment)" ,
63
+ public static readonly IColumn Kurtosis = new StatisticColumn ( Column . Kurtosis , "Measure of the tailedness ( fourth standardized moment)" ,
64
64
s => s . Kurtosis , Priority . Additional , UnitType . Dimensionless ) ;
65
65
66
66
/// <summary>
67
67
/// See http://www.brendangregg.com/FrequencyTrails/modes.html
68
68
/// </summary>
69
- public static readonly IColumn MValue = new StatisticColumn ( " MValue" , "Modal value, see http://www.brendangregg.com/FrequencyTrails/modes.html" ,
69
+ public static readonly IColumn MValue = new StatisticColumn ( Column . MValue , "Modal value, see http://www.brendangregg.com/FrequencyTrails/modes.html" ,
70
70
s => MValueCalculator . Calculate ( s . OriginalValues ) , Priority . Additional , UnitType . Dimensionless ) ;
71
71
72
- public static readonly IColumn Iterations = new StatisticColumn ( " Iterations" , "Number of target iterations" ,
72
+ public static readonly IColumn Iterations = new StatisticColumn ( Column . Iterations , "Number of target iterations" ,
73
73
s => s . N , Priority . Additional , UnitType . Dimensionless ) ;
74
74
75
- public static readonly IColumn P0 = CreatePercentileColumn ( 0 , s => s . Percentiles . P0 ) ;
76
- public static readonly IColumn P25 = CreatePercentileColumn ( 25 , s => s . Percentiles . P25 ) ;
77
- public static readonly IColumn P50 = CreatePercentileColumn ( 50 , s => s . Percentiles . P50 ) ;
78
- public static readonly IColumn P67 = CreatePercentileColumn ( 67 , s => s . Percentiles . P67 ) ;
79
- public static readonly IColumn P80 = CreatePercentileColumn ( 80 , s => s . Percentiles . P80 ) ;
80
- public static readonly IColumn P85 = CreatePercentileColumn ( 85 , s => s . Percentiles . P85 ) ;
81
- public static readonly IColumn P90 = CreatePercentileColumn ( 90 , s => s . Percentiles . P90 ) ;
82
- public static readonly IColumn P95 = CreatePercentileColumn ( 95 , s => s . Percentiles . P95 ) ;
83
- public static readonly IColumn P100 = CreatePercentileColumn ( 100 , s => s . Percentiles . P100 ) ;
75
+ public static readonly IColumn P0 = CreatePercentileColumn ( 0 , Column . P0 , s => s . Percentiles . P0 ) ;
76
+ public static readonly IColumn P25 = CreatePercentileColumn ( 25 , Column . P25 , s => s . Percentiles . P25 ) ;
77
+ public static readonly IColumn P50 = CreatePercentileColumn ( 50 , Column . P50 , s => s . Percentiles . P50 ) ;
78
+ public static readonly IColumn P67 = CreatePercentileColumn ( 67 , Column . P67 , s => s . Percentiles . P67 ) ;
79
+ public static readonly IColumn P80 = CreatePercentileColumn ( 80 , Column . P80 , s => s . Percentiles . P80 ) ;
80
+ public static readonly IColumn P85 = CreatePercentileColumn ( 85 , Column . P85 , s => s . Percentiles . P85 ) ;
81
+ public static readonly IColumn P90 = CreatePercentileColumn ( 90 , Column . P90 , s => s . Percentiles . P90 ) ;
82
+ public static readonly IColumn P95 = CreatePercentileColumn ( 95 , Column . P95 , s => s . Percentiles . P95 ) ;
83
+ public static readonly IColumn P100 = CreatePercentileColumn ( 100 , Column . P100 , s => s . Percentiles . P100 ) ;
84
84
85
85
[ PublicAPI ]
86
86
public static IColumn CiLower ( ConfidenceLevel level ) => new StatisticColumn (
@@ -165,7 +165,7 @@ private string Format(Summary summary, ImmutableConfig config, Statistics statis
165
165
166
166
public bool IsDefault ( Summary summary , BenchmarkCase benchmarkCase ) => false ;
167
167
168
- private static IColumn CreatePercentileColumn ( int percentiles , Func < Statistics , double > calc ) => new StatisticColumn (
169
- "P" + percentiles , "Percentile " + percentiles , calc , Priority . Percentiles ) ;
168
+ private static IColumn CreatePercentileColumn ( int percentiles , string columnName , Func < Statistics , double > calc ) => new StatisticColumn (
169
+ columnName , "Percentile " + percentiles , calc , Priority . Percentiles ) ;
170
170
}
171
171
}
0 commit comments