File tree Expand file tree Collapse file tree
runners/s3-benchrunner-java/src/main/java/com/example/s3benchrunner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,11 +42,12 @@ private static void printStats(long bytesPerRun, List<Double> durations) {
4242 ? sortedGbps [len / 2 ]
4343 : (sortedGbps [len / 2 - 1 ] + sortedGbps [len / 2 ]) / 2.0 ;
4444
45- // Variance of throughput
45+ // Standard deviation of throughput
4646 double gbpsVariance = 0 ;
4747 for (double g : gbpsValues ) {
4848 gbpsVariance += (g - gbpsMean ) * (g - gbpsMean ) / n ;
4949 }
50+ double gbpsStdDev = Math .sqrt (gbpsVariance );
5051
5152 // Mean and variance of duration
5253 double durationMean = 0 ;
@@ -57,6 +58,7 @@ private static void printStats(long bytesPerRun, List<Double> durations) {
5758 for (Double duration : durations ) {
5859 durationVariance += (duration - durationMean ) * (duration - durationMean ) / n ;
5960 }
61+ double durationStdDev = Math .sqrt (durationVariance );
6062
6163 // Median duration
6264 double [] sortedDurations = durations .stream ().mapToDouble (Double ::doubleValue ).sorted ().toArray ();
@@ -74,9 +76,9 @@ private static void printStats(long bytesPerRun, List<Double> durations) {
7476 gbpsMedian ,
7577 durationMedian );
7678 System .out .printf (
77- "Overall stats (variance); Throughput:%.3f Gb/s Duration:%.3f s%n" ,
78- gbpsVariance ,
79- durationVariance );
79+ "Overall stats (stddev); Throughput:%.3f Gb/s Duration:%.3f s%n" ,
80+ gbpsStdDev ,
81+ durationStdDev );
8082 }
8183
8284 public static void main (String [] args ) throws Exception {
You can’t perform that action at this time.
0 commit comments