changeset 963:83849e54f773

output: shun the results without any values (e.g. perfasm @asm, and stack @stack).
author shade
date Mon, 18 Aug 2014 15:41:06 +0400
parents b6b8161b42a2
children da149d95b9cc
files jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java jmh-core/src/main/java/org/openjdk/jmh/results/ResultRole.java
diffstat 3 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Mon Aug 18 15:30:32 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Mon Aug 18 15:41:06 2014 +0400
@@ -765,7 +765,7 @@
         private final String output;
 
         public PerfResult(String output) {
-            super(ResultRole.SECONDARY, "@asm", of(Double.NaN), "---", AggregationPolicy.AVG);
+            super(ResultRole.OMITTED, "@asm", of(Double.NaN), "---", AggregationPolicy.AVG);
             this.output = output;
         }
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java	Mon Aug 18 15:30:32 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java	Mon Aug 18 15:41:06 2014 +0400
@@ -31,7 +31,6 @@
 import org.openjdk.jmh.results.Result;
 import org.openjdk.jmh.results.ResultRole;
 import org.openjdk.jmh.util.HashMultiset;
-import org.openjdk.jmh.util.ListStatistics;
 import org.openjdk.jmh.util.Multiset;
 import org.openjdk.jmh.util.Multisets;
 
@@ -201,7 +200,7 @@
         private final Map<Thread.State, Multiset<StackRecord>> stacks;
 
         public StackResult(Map<Thread.State, Multiset<StackRecord>> stacks) {
-            super(ResultRole.SECONDARY, "@stack", new ListStatistics(), "none", AggregationPolicy.AVG);
+            super(ResultRole.OMITTED, "@stack", of(Double.NaN), "---", AggregationPolicy.AVG);
             this.stacks = stacks;
         }
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/ResultRole.java	Mon Aug 18 15:30:32 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/ResultRole.java	Mon Aug 18 15:41:06 2014 +0400
@@ -25,8 +25,21 @@
 package org.openjdk.jmh.results;
 
 public enum ResultRole {
+
+    /**
+     * Participates in primary metric calculation.
+     */
     PRIMARY,
-    SECONDARY
+
+    /**
+     * Participates in secondary metric calculations.
+     */
+    SECONDARY,
+
+    /**
+     * Does not participate in any metric, garbage result.
+     */
+    OMITTED,
     ;
 
     public boolean isPrimary() {