changeset 921:92ebbc95d6c8

results: purge astray RunResult.getScoreUnit.
author shade
date Tue, 22 Jul 2014 12:47:42 +0400
parents 68fcb2f9aacf
children 72ca77dfb5c6
files jmh-core/src/main/java/org/openjdk/jmh/results/RunResult.java jmh-core/src/main/java/org/openjdk/jmh/results/format/TextResultFormat.java
diffstat 2 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/RunResult.java	Mon Jul 21 22:25:34 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/RunResult.java	Tue Jul 22 12:47:42 2014 +0400
@@ -101,10 +101,6 @@
         return result;
     }
 
-    public String getScoreUnit() {
-        return getPrimaryResult().getScoreUnit();
-    }
-
     public BenchmarkParams getParams() {
         return params;
     }
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/format/TextResultFormat.java	Mon Jul 21 22:25:34 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/format/TextResultFormat.java	Tue Jul 22 12:47:42 2014 +0400
@@ -94,11 +94,12 @@
                     out.print(String.format("%" + paramLengths.get(k) + "s ", (v == null) ? "N/A" : v));
                 }
 
+                Result pRes = res.getPrimaryResult();
                 out.print(String.format("%6s %9d %12.3f %12.3f %8s%n",
                         res.getParams().getMode().shortLabel(),
-                        res.getPrimaryResult().getSampleCount(),
-                        res.getPrimaryResult().getScore(), res.getPrimaryResult().getScoreError(),
-                        res.getScoreUnit()));
+                        pRes.getSampleCount(),
+                        pRes.getScore(), pRes.getScoreError(),
+                        pRes.getScoreUnit()));
             }
 
             for (String label : res.getSecondaryResults().keySet()) {