changeset 364:d664e79b3c0b

(S)CSV result formatters should emit "Samples", not iteration info.
author shade
date Thu, 23 Jan 2014 02:22:10 +0400
parents 1406e1e592a9
children 5990033f24ae
files jmh-core/src/main/java/org/openjdk/jmh/output/results/XSVResultFormat.java jmh-core/src/test/resources/org/openjdk/jmh/output/results/output-golden.csv jmh-core/src/test/resources/org/openjdk/jmh/output/results/output-golden.scsv
diffstat 3 files changed, 14 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/output/results/XSVResultFormat.java	Thu Jan 23 02:03:41 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/output/results/XSVResultFormat.java	Thu Jan 23 02:22:10 2014 +0400
@@ -30,7 +30,6 @@
 import java.io.BufferedWriter;
 import java.io.FileWriter;
 import java.io.IOException;
-import java.io.PrintWriter;
 import java.util.Map;
 
 public class XSVResultFormat implements ResultFormat {
@@ -56,9 +55,7 @@
             bw.write(delimiter);
             bw.write("\"Threads\"");
             bw.write(delimiter);
-            bw.write("\"Iterations\"");
-            bw.write(delimiter);
-            bw.write("\"Iteration time\"");
+            bw.write("\"Samples\"");
             bw.write(delimiter);
             bw.write("\"Mean\"");
             bw.write(delimiter);
@@ -80,11 +77,7 @@
                 bw.write(delimiter);
                 bw.write(String.valueOf(runResult.getParams().getThreads()));
                 bw.write(delimiter);
-                bw.write(String.valueOf(runResult.getParams().getMeasurement().getCount()));
-                bw.write(delimiter);
-                bw.write("\"");
-                bw.write(String.valueOf(runResult.getParams().getMeasurement().getTime()));
-                bw.write("\"");
+                bw.write(String.valueOf(runResult.getPrimaryResult().getStatistics().getN()));
                 bw.write(delimiter);
                 bw.write(String.valueOf(runResult.getPrimaryResult().getStatistics().getMean()));
                 bw.write(delimiter);
--- a/jmh-core/src/test/resources/org/openjdk/jmh/output/results/output-golden.csv	Thu Jan 23 02:03:41 2014 +0400
+++ b/jmh-core/src/test/resources/org/openjdk/jmh/output/results/output-golden.csv	Thu Jan 23 02:22:10 2014 +0400
@@ -1,6 +1,6 @@
-"Benchmark","Mode","Threads","Iterations","Iteration time","Mean","Mean Error (99.9%)","Unit"
-"benchmark_0","avgt",80,802,"501 s",528.8571428571429,278.1419529743147,"ops/ms"
-"benchmark_1","avgt",900,55,"398 s",439.0,NaN,"ops/ms"
-"benchmark_2","avgt",466,461,"96 s",545.0,553.3366994253071,"ops/ms"
-"benchmark_3","avgt",968,857,"438 s",417.57142857142856,362.81396705929166,"ops/ms"
-"benchmark_4","avgt",739,16,"763 s",956.0,NaN,"ops/ms"
\ No newline at end of file
+"Benchmark","Mode","Threads","Samples","Mean","Mean Error (99.9%)","Unit"
+"benchmark_0","avgt",80,14,528.8571428571429,278.1419529743147,"ops/ms"
+"benchmark_1","avgt",900,1,439.0,NaN,"ops/ms"
+"benchmark_2","avgt",466,9,545.0,553.3366994253071,"ops/ms"
+"benchmark_3","avgt",968,14,417.57142857142856,362.81396705929166,"ops/ms"
+"benchmark_4","avgt",739,1,956.0,NaN,"ops/ms"
--- a/jmh-core/src/test/resources/org/openjdk/jmh/output/results/output-golden.scsv	Thu Jan 23 02:03:41 2014 +0400
+++ b/jmh-core/src/test/resources/org/openjdk/jmh/output/results/output-golden.scsv	Thu Jan 23 02:22:10 2014 +0400
@@ -1,6 +1,6 @@
-"Benchmark";"Mode";"Threads";"Iterations";"Iteration time";"Mean";"Mean Error (99.9%)";"Unit"
-"benchmark_0";"avgt";80;802;"501 s";528.8571428571429;278.1419529743147;"ops/ms"
-"benchmark_1";"avgt";900;55;"398 s";439.0;NaN;"ops/ms"
-"benchmark_2";"avgt";466;461;"96 s";545.0;553.3366994253071;"ops/ms"
-"benchmark_3";"avgt";968;857;"438 s";417.57142857142856;362.81396705929166;"ops/ms"
-"benchmark_4";"avgt";739;16;"763 s";956.0;NaN;"ops/ms"
\ No newline at end of file
+"Benchmark";"Mode";"Threads";"Samples";"Mean";"Mean Error (99.9%)";"Unit"
+"benchmark_0";"avgt";80;14;528.8571428571429;278.1419529743147;"ops/ms"
+"benchmark_1";"avgt";900;1;439.0;NaN;"ops/ms"
+"benchmark_2";"avgt";466;9;545.0;553.3366994253071;"ops/ms"
+"benchmark_3";"avgt";968;14;417.57142857142856;362.81396705929166;"ops/ms"
+"benchmark_4";"avgt";739;1;956.0;NaN;"ops/ms"
\ No newline at end of file