changeset 270:ac48463e3d0c

Print out score error.
author shade
date Mon, 25 Nov 2013 18:20:16 +0400
parents 35ea8b9247b0
children 5d7e2200fd17
files jmh-core/src/main/java/org/openjdk/jmh/output/results/JSONResultFormat.java
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/output/results/JSONResultFormat.java	Mon Nov 25 18:05:47 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/output/results/JSONResultFormat.java	Mon Nov 25 18:20:16 2013 +0400
@@ -70,6 +70,7 @@
                 pw.println("\"iterationTime\" : \"" + runResult.getTime() + "\",");
                 pw.println("\"primaryMetric\" : {");
                 pw.println("\"score\" : " + runResult.getPrimaryResult().getScore() + ",");
+                pw.println("\"scoreError\" : " + runResult.getPrimaryResult().getStatistics().getMeanErrorAt(0.999) + ",");
                 pw.println("\"scoreStdev\" : " + runResult.getPrimaryResult().getStatistics().getStandardDeviation() + ",");
                 pw.println("\"scoreConfidence95\" : " + Arrays.toString(runResult.getPrimaryResult().getStatistics().getConfidenceIntervalAt(0.95)) + ",");
                 pw.println("\"scoreConfidence99\" : " + Arrays.toString(runResult.getPrimaryResult().getStatistics().getConfidenceIntervalAt(0.99)) + ",");
@@ -95,14 +96,15 @@
                     Result result = runResult.getSecondaryResults().get(secondaryName);
 
                     StringBuilder sb = new StringBuilder();
-                    sb.append("\"").append(secondaryName).append("\" : {").append("\n");
-                    sb.append("\"score\" : ").append(result.getScore()).append(",").append("\n");
-                    sb.append("\"scoreStdev\" : ").append(result.getStatistics().getStandardDeviation()).append(",").append("\n");
-                    sb.append("\"scoreConfidence95\" : ").append(Arrays.toString(result.getStatistics().getConfidenceIntervalAt(0.95))).append(",").append("\n");
-                    sb.append("\"scoreConfidence99\" : ").append(Arrays.toString(result.getStatistics().getConfidenceIntervalAt(0.99))).append(",").append("\n");
-                    sb.append("\"scoreConfidence999\" : ").append(Arrays.toString(result.getStatistics().getConfidenceIntervalAt(0.999))).append(",").append("\n");
-                    sb.append("\"scoreUnit\" : \"").append(result.getScoreUnit()).append("\",").append("\n");
-                    sb.append("\"rawData\" :").append("\n");
+                    sb.append("\"").append(secondaryName).append("\" : {");
+                    sb.append("\"score\" : ").append(result.getScore()).append(",");
+                    sb.append("\"scoreError\" : ").append(runResult.getPrimaryResult().getStatistics().getMeanErrorAt(0.999)).append(",");
+                    sb.append("\"scoreStdev\" : ").append(result.getStatistics().getStandardDeviation()).append(",");
+                    sb.append("\"scoreConfidence95\" : ").append(Arrays.toString(result.getStatistics().getConfidenceIntervalAt(0.95))).append(",");
+                    sb.append("\"scoreConfidence99\" : ").append(Arrays.toString(result.getStatistics().getConfidenceIntervalAt(0.99))).append(",");
+                    sb.append("\"scoreConfidence999\" : ").append(Arrays.toString(result.getStatistics().getConfidenceIntervalAt(0.999))).append(",");
+                    sb.append("\"scoreUnit\" : \"").append(result.getScoreUnit()).append("\",");
+                    sb.append("\"rawData\" :");
 
                     Collection<String> l2 = new ArrayList<String>();
                     for (BenchResult benchResult : runResult.getRawBenchResults()) {