changeset 271:5d7e2200fd17

Publish BenchmarkParams in the API.
author shade
date Mon, 25 Nov 2013 20:43:49 +0400
parents ac48463e3d0c
children 93cbcb0f4c8c
files jmh-core/src/main/java/org/openjdk/jmh/logic/results/BenchResult.java jmh-core/src/main/java/org/openjdk/jmh/logic/results/IterationResult.java jmh-core/src/main/java/org/openjdk/jmh/logic/results/RunResult.java jmh-core/src/main/java/org/openjdk/jmh/output/format/TextReportFormat.java jmh-core/src/main/java/org/openjdk/jmh/output/results/CSVResultFormat.java jmh-core/src/main/java/org/openjdk/jmh/output/results/JSONResultFormat.java jmh-core/src/main/java/org/openjdk/jmh/runner/BaseRunner.java jmh-core/src/main/java/org/openjdk/jmh/runner/LoopMicroBenchmarkHandler.java jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java jmh-core/src/main/java/org/openjdk/jmh/runner/parameters/BenchmarkParams.java jmh-core/src/main/java/org/openjdk/jmh/runner/parameters/IterationParams.java jmh-core/src/test/java/org/openjdk/jmh/logic/results/TestAggregateResult.java
diffstat 12 files changed, 154 insertions(+), 131 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/logic/results/BenchResult.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/logic/results/BenchResult.java	Mon Nov 25 20:43:49 2013 +0400
@@ -25,7 +25,7 @@
 package org.openjdk.jmh.logic.results;
 
 import org.openjdk.jmh.runner.BenchmarkRecord;
-import org.openjdk.jmh.runner.parameters.IterationParams;
+import org.openjdk.jmh.runner.parameters.BenchmarkParams;
 import org.openjdk.jmh.util.internal.HashMultimap;
 import org.openjdk.jmh.util.internal.Multimap;
 
@@ -47,17 +47,17 @@
 
     private final Collection<IterationResult> iterationResults;
     private final BenchmarkRecord benchmark;
-    private final IterationParams params;
+    private final BenchmarkParams params;
 
     public BenchResult(Collection<IterationResult> data) {
         this.iterationResults = data;
 
         BenchmarkRecord myRecord = null;
-        IterationParams myParams = null;
+        BenchmarkParams myParams = null;
 
         for (IterationResult ir : data) {
             BenchmarkRecord record = ir.getBenchmark();
-            IterationParams params = ir.getParams();
+            BenchmarkParams params = ir.getParams().getBenchmarkParams();
             if (myRecord != null && !record.equals(myRecord)) {
                 throw new IllegalStateException("Aggregating the iteration results from different benchmarks");
             } else {
@@ -128,7 +128,7 @@
         return benchmark;
     }
 
-    public IterationParams getParams() {
+    public BenchmarkParams getParams() {
         return params;
     }
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/logic/results/IterationResult.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/logic/results/IterationResult.java	Mon Nov 25 20:43:49 2013 +0400
@@ -54,7 +54,7 @@
     public IterationResult(BenchmarkRecord benchmark, IterationParams params) {
         this.benchmark = benchmark;
         this.params = params;
-        this.primaryResults = new ArrayList<Result>(params.getThreads());
+        this.primaryResults = new ArrayList<Result>();
         this.profilerResults = new ArrayList<ProfilerResult>();
         this.secondaryResults = new TreeMultimap<String, Result>();
     }
--- a/jmh-core/src/main/java/org/openjdk/jmh/logic/results/RunResult.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/logic/results/RunResult.java	Mon Nov 25 20:43:49 2013 +0400
@@ -25,8 +25,7 @@
 package org.openjdk.jmh.logic.results;
 
 import org.openjdk.jmh.runner.BenchmarkRecord;
-import org.openjdk.jmh.runner.parameters.IterationParams;
-import org.openjdk.jmh.runner.parameters.TimeValue;
+import org.openjdk.jmh.runner.parameters.BenchmarkParams;
 import org.openjdk.jmh.util.internal.HashMultimap;
 import org.openjdk.jmh.util.internal.Multimap;
 
@@ -49,17 +48,17 @@
 
     private final Collection<BenchResult> benchResults;
     private final BenchmarkRecord benchmark;
-    private final IterationParams params;
+    private final BenchmarkParams params;
 
     public RunResult(Collection<BenchResult> data) {
         this.benchResults = data;
 
         BenchmarkRecord myRecord = null;
-        IterationParams myParams = null;
+        BenchmarkParams myParams = null;
 
         for (BenchResult br : data) {
             BenchmarkRecord record = br.getBenchmark();
-            IterationParams params = br.getParams();
+            BenchmarkParams params = br.getParams();
 
             if (myRecord != null && !record.equals(myRecord)) {
                 throw new IllegalStateException("Aggregating the benchmark results from different benchmarks");
@@ -132,19 +131,11 @@
         return getPrimaryResult().getScoreUnit();
     }
 
-    public int getThreads() {
-        return params.getThreads();
-    }
-
-    public TimeValue getTime() {
-        return params.getTime();
-    }
-
     public BenchmarkRecord getBenchmark() {
         return benchmark;
     }
 
-    public int getIterationCount() {
-        return params.getCount();
+    public BenchmarkParams getParams() {
+        return params;
     }
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/output/format/TextReportFormat.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/output/format/TextReportFormat.java	Mon Nov 25 20:43:49 2013 +0400
@@ -181,8 +181,8 @@
         for (BenchmarkRecord key : runResults.keySet()) {
             RunResult res = runResults.get(key);
 
-            int threads = res.getThreads();
-            TimeValue runTime = res.getTime();
+            int threads = res.getParams().getThreads();
+            TimeValue runTime = res.getParams().getIteration().getTime();
 
             {
                 Statistics stats = res.getPrimaryResult().getStatistics();
--- a/jmh-core/src/main/java/org/openjdk/jmh/output/results/CSVResultFormat.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/output/results/CSVResultFormat.java	Mon Nov 25 20:43:49 2013 +0400
@@ -55,11 +55,11 @@
                 pw.print("\", \"");
                 pw.print(br.getMode().shortLabel());
                 pw.print("\", ");
-                pw.print(runResult.getThreads());
+                pw.print(runResult.getParams().getThreads());
                 pw.print(", ");
-                pw.print(runResult.getIterationCount());
+                pw.print(runResult.getParams().getIteration().getCount());
                 pw.print(", \"");
-                pw.print(runResult.getTime());
+                pw.print(runResult.getParams().getIteration().getTime());
                 pw.print("\", ");
                 pw.print(runResult.getPrimaryResult().getStatistics().getMean());
                 pw.print(", ");
--- a/jmh-core/src/main/java/org/openjdk/jmh/output/results/JSONResultFormat.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/output/results/JSONResultFormat.java	Mon Nov 25 20:43:49 2013 +0400
@@ -65,9 +65,9 @@
                 pw.println("{");
                 pw.println("\"benchmark\" : \"" + br.getUsername() + "\",");
                 pw.println("\"mode\" : \"" + br.getMode().shortLabel() + "\",");
-                pw.println("\"threads\" : " + runResult.getThreads() + ",");
-                pw.println("\"iterations\" : " + runResult.getIterationCount() + ",");
-                pw.println("\"iterationTime\" : \"" + runResult.getTime() + "\",");
+                pw.println("\"threads\" : " + runResult.getParams().getThreads() + ",");
+                pw.println("\"iterations\" : " + runResult.getParams().getIteration().getCount() + ",");
+                pw.println("\"iterationTime\" : \"" + runResult.getParams().getIteration().getTime() + "\",");
                 pw.println("\"primaryMetric\" : {");
                 pw.println("\"score\" : " + runResult.getPrimaryResult().getScore() + ",");
                 pw.println("\"scoreError\" : " + runResult.getPrimaryResult().getStatistics().getMeanErrorAt(0.999) + ",");
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/BaseRunner.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/BaseRunner.java	Mon Nov 25 20:43:49 2013 +0400
@@ -64,7 +64,7 @@
             Class<?> clazz = ClassUtils.loadClass(benchmark.generatedClass());
             Method method = MicroBenchmarkHandlers.findBenchmarkMethod(clazz, benchmark.generatedMethod());
 
-            BenchmarkParams executionParams = BenchmarkParams.makeParams(options, benchmark, method, doWarmup, doMeasurement);
+            BenchmarkParams executionParams = new BenchmarkParams(options, benchmark, doWarmup, doMeasurement);
             handler = MicroBenchmarkHandlers.getInstance(out, benchmark, clazz, method, executionParams, options);
 
             return runBenchmark(executionParams, handler);
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/LoopMicroBenchmarkHandler.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/LoopMicroBenchmarkHandler.java	Mon Nov 25 20:43:49 2013 +0400
@@ -74,7 +74,7 @@
      */
     @Override
     public IterationResult runIteration(IterationParams params, boolean last) {
-        int numThreads = params.getThreads();
+        int numThreads = params.getBenchmarkParams().getThreads();
         TimeValue runtime = params.getTime();
 
         CountDownLatch preSetupBarrier = new CountDownLatch(numThreads);
@@ -88,7 +88,7 @@
         // preparing the worker runnables
         BenchmarkTask[] runners = new BenchmarkTask[numThreads];
 
-        int[] groups = params.getThreadGroups();
+        int[] groups = params.getBenchmarkParams().getThreadGroups();
         int currentGroup = 0;
         int currentSubgroup = 0;
         int remainingSubgroupThreads = groups[currentSubgroup];
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java	Mon Nov 25 20:43:49 2013 +0400
@@ -36,7 +36,7 @@
 import org.openjdk.jmh.output.results.ResultFormatFactory;
 import org.openjdk.jmh.runner.options.Options;
 import org.openjdk.jmh.runner.options.WarmupMode;
-import org.openjdk.jmh.runner.parameters.Defaults;
+import org.openjdk.jmh.runner.parameters.BenchmarkParams;
 import org.openjdk.jmh.util.AnnotationUtils;
 import org.openjdk.jmh.util.InputStreamDrainer;
 import org.openjdk.jmh.util.internal.HashMultimap;
@@ -259,25 +259,6 @@
         return runResults;
     }
 
-    private int decideForks(int optionForks, int benchForks) {
-        if (optionForks == -1) {
-            if (benchForks == -1) {
-                return Defaults.DEFAULT_FORK_TIMES;
-            } else {
-                return benchForks;
-            }
-        } else {
-            return optionForks;
-        }
-    }
-
-    private int decideWarmupForks(int optionWarmupForks, Fork forkAnnotation) {
-        if (optionWarmupForks == -1) {
-            return (forkAnnotation != null) ? forkAnnotation.warmups() : 0;
-        } else {
-            return optionWarmupForks;
-        }
-    }
 
     private Map<BenchmarkRecord, RunResult> runBenchmarks(Set<BenchmarkRecord> benchmarks) {
         Set<BenchmarkRecord> embedded = new TreeSet<BenchmarkRecord>();
@@ -285,8 +266,8 @@
 
         out.startRun();
         for (BenchmarkRecord benchmark : benchmarks) {
-            int f = decideForks(options.getForkCount(), benchForks(benchmark));
-            if (f > 0) {
+            BenchmarkParams params = new BenchmarkParams(options, benchmark, true, true);
+            if (params.getForks() > 0) {
                 forked.add(benchmark);
             } else {
                 embedded.add(benchmark);
@@ -353,8 +334,10 @@
 
                 String[] commandString = getSeparateExecutionCommand(benchmark, annJvmArgs, annJvmArgsPrepend, annJvmArgsAppend, server.getHost(), server.getPort());
 
-                int forkCount = decideForks(options.getForkCount(), benchForks(benchmark));
-                int warmupForkCount = decideWarmupForks(options.getWarmupForkCount(), forkAnnotation);
+                BenchmarkParams params = new BenchmarkParams(options, benchmark, true, true);
+
+                int forkCount = params.getForks();
+                int warmupForkCount = params.getWarmupForks();
                 if (warmupForkCount > 0) {
                     out.verbosePrintln("Warmup forking " + warmupForkCount + " times using command: " + Arrays.toString(commandString));
                     for (int i = 0; i < warmupForkCount; i++) {
@@ -381,14 +364,6 @@
         return results;
     }
 
-    /**
-     * Tests if the benchmark has the fork annotation
-     */
-    private int benchForks(BenchmarkRecord benchmark) {
-        Method m = MicroBenchmarkHandlers.findBenchmarkMethod(benchmark);
-        Fork fork = m.getAnnotation(Fork.class);
-        return (fork != null) ? fork.value() : -1;
-    }
 
     private BenchResult doFork(BinaryLinkServer reader, String[] commandString) {
         try {
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/parameters/BenchmarkParams.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/parameters/BenchmarkParams.java	Mon Nov 25 20:43:49 2013 +0400
@@ -25,54 +25,32 @@
 package org.openjdk.jmh.runner.parameters;
 
 
+import org.openjdk.jmh.annotations.Fork;
 import org.openjdk.jmh.annotations.Measurement;
 import org.openjdk.jmh.annotations.Mode;
 import org.openjdk.jmh.annotations.Threads;
 import org.openjdk.jmh.annotations.Warmup;
 import org.openjdk.jmh.runner.BenchmarkRecord;
+import org.openjdk.jmh.runner.MicroBenchmarkHandlers;
 import org.openjdk.jmh.runner.options.Options;
+import org.openjdk.jmh.util.ClassUtils;
 import org.openjdk.jmh.util.Utils;
 
 import java.io.Serializable;
 import java.lang.reflect.Method;
+import java.util.Arrays;
 
 public class BenchmarkParams implements Serializable {
 
-    public static BenchmarkParams makeParams(Options options, BenchmarkRecord benchmark, Method method, boolean doWarmup, boolean doMeasurement) {
-        boolean shouldSynchIterations = getBoolean(options.getSynchIterations(), Defaults.SHOULD_SYNCH_ITERATIONS);
-
-        int threads = getThreads(options, method);
-        if (threads == Threads.MAX) {
-            threads = Runtime.getRuntime().availableProcessors();
-        }
-
-        int[] threadGroups = getThreadGroups(options.getThreadGroups(), benchmark.getThreadGroups());
-        threads = Utils.roundUp(threads, Utils.sum(threadGroups));
-
-        IterationParams measurement = doMeasurement ?
-                getMeasurement(options, benchmark, method, threads, threadGroups) :
-                new IterationParams(0, TimeValue.NONE, 1, 1);
-
-        IterationParams warmup = doWarmup ?
-                getWarmup(options, benchmark, method, threads, threadGroups) :
-                new IterationParams(0, TimeValue.NONE, 1, 1);
-
-        return new BenchmarkParams(
-                shouldSynchIterations,
-                warmup, measurement,
-                threads);
-    }
-
-    private static IterationParams getWarmup(Options options, BenchmarkRecord benchmark, Method method, int threads, int[] threadGroups) {
+    private IterationParams getWarmup(Options options, BenchmarkRecord benchmark, Method method) {
         boolean isSingleShot = (benchmark.getMode() == Mode.SingleShotTime);
         Warmup warAnn = method.getAnnotation(Warmup.class);
         int iters = (warAnn == null) ? -1 : warAnn.iterations();
         if (isSingleShot) {
             return new IterationParams(
+                    this,
                     getInteger(options.getWarmupIterations(), iters, Defaults.SINGLE_SHOT_WARMUP_COUNT),
-                    TimeValue.NONE,
-                    threads,
-                    threadGroups);
+                    TimeValue.NONE);
         } else {
             TimeValue timeValue = options.getWarmupTime();
             if (timeValue == null || timeValue.getTime() == -1) {
@@ -83,23 +61,21 @@
                 }
             }
             return new IterationParams(
+                    this,
                     getInteger(options.getWarmupIterations(), iters, Defaults.WARMUP_ITERATION_COUNT),
-                    timeValue,
-                    threads,
-                    threadGroups);
+                    timeValue);
         }
     }
 
-    private static IterationParams getMeasurement(Options options, BenchmarkRecord benchmark, Method method, int threads, int[] threadGroups) {
+    private IterationParams getMeasurement(Options options, BenchmarkRecord benchmark, Method method) {
         boolean isSingleShot = (benchmark.getMode() == Mode.SingleShotTime);
         Measurement meAnn = method.getAnnotation(Measurement.class);
         int iters = (meAnn == null) ? -1 : meAnn.iterations();
         if (isSingleShot) {
             return new IterationParams(
+                    this,
                     getInteger(options.getIterations(), iters, Defaults.SINGLE_SHOT_ITERATION_COUNT),
-                    TimeValue.NONE,
-                    threads,
-                    threadGroups);
+                    TimeValue.NONE);
 
         } else {
             TimeValue timeValue = options.getRuntime();
@@ -111,14 +87,13 @@
                 }
             }
             return new IterationParams(
+                    this,
                     getInteger(options.getIterations(), iters, Defaults.MEASUREMENT_ITERATION_COUNT),
-                    timeValue,
-                    threads,
-                    threadGroups);
+                    timeValue);
         }
     }
 
-    private static int[] getThreadGroups(int[] first, int[] second) {
+    private static int[] decideThreadGroups(int[] first, int[] second) {
         if (first.length == 1 && first[0] == 1) {
             return second;
         } else {
@@ -135,14 +110,68 @@
 
     private final boolean synchIterations;
     private final int threads;
+    private final int[] threadGroups;
+    private final int forks;
+    private final int warmupForks;
     private final IterationParams warmup;
     private final IterationParams iteration;
 
-    public BenchmarkParams(boolean synchIterations, IterationParams warmup, IterationParams iteration, int threads) {
-        this.synchIterations = synchIterations;
-        this.warmup = warmup;
-        this.iteration = iteration;
+    private int decideForks(int optionForks, int benchForks) {
+        if (optionForks == -1) {
+            if (benchForks == -1) {
+                return Defaults.DEFAULT_FORK_TIMES;
+            } else {
+                return benchForks;
+            }
+        } else {
+            return optionForks;
+        }
+    }
+
+    private int decideWarmupForks(int optionWarmupForks, Fork forkAnnotation) {
+        if (optionWarmupForks == -1) {
+            return (forkAnnotation != null) ? forkAnnotation.warmups() : 0;
+        } else {
+            return optionWarmupForks;
+        }
+    }
+
+    /**
+     * Tests if the benchmark has the fork annotation
+     */
+    private int benchForks(BenchmarkRecord benchmark) {
+        Method m = MicroBenchmarkHandlers.findBenchmarkMethod(benchmark);
+        Fork fork = m.getAnnotation(Fork.class);
+        return (fork != null) ? fork.value() : -1;
+    }
+
+    public BenchmarkParams(Options options, BenchmarkRecord benchmark, boolean doWarmup, boolean doMeasurement) {
+        Class<?> clazz = ClassUtils.loadClass(benchmark.generatedClass());
+        Method method = MicroBenchmarkHandlers.findBenchmarkMethod(clazz, benchmark.generatedMethod());
+
+        this.threadGroups = decideThreadGroups(options.getThreadGroups(), benchmark.getThreadGroups());
+
+        int threads = getThreads(options, method);
+        if (threads == Threads.MAX) {
+            threads = Runtime.getRuntime().availableProcessors();
+        }
+        threads = Utils.roundUp(threads, Utils.sum(threadGroups));
         this.threads = threads;
+
+        this.synchIterations = getBoolean(options.getSynchIterations(), Defaults.SHOULD_SYNCH_ITERATIONS);
+
+        this.iteration = doMeasurement ?
+                getMeasurement(options, benchmark, method) :
+                new IterationParams(this, 0, TimeValue.NONE);
+
+        this.warmup = doWarmup ?
+                getWarmup(options, benchmark, method) :
+                new IterationParams(this, 0, TimeValue.NONE);
+
+        Fork forkAnnotation = method.getAnnotation(Fork.class);
+
+        this.forks = decideForks(options.getForkCount(), benchForks(benchmark));
+        this.warmupForks = decideWarmupForks(options.getWarmupForkCount(), forkAnnotation);
     }
 
     public boolean shouldSynchIterations() {
@@ -161,6 +190,18 @@
         return threads;
     }
 
+    public int[] getThreadGroups() {
+        return threadGroups;
+    }
+
+    public int getForks() {
+        return forks;
+    }
+
+    public int getWarmupForks() {
+        return warmupForks;
+    }
+
     private static boolean getBoolean(Boolean value, boolean defaultValue) {
         return value == null ? defaultValue : value;
     }
@@ -169,4 +210,33 @@
         return first >= 0 ? first : (second >= 0 ? second : third);
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        BenchmarkParams that = (BenchmarkParams) o;
+
+        if (forks != that.forks) return false;
+        if (synchIterations != that.synchIterations) return false;
+        if (threads != that.threads) return false;
+        if (warmupForks != that.warmupForks) return false;
+        if (!iteration.equals(that.iteration)) return false;
+        if (!Arrays.equals(threadGroups, that.threadGroups)) return false;
+        if (!warmup.equals(that.warmup)) return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = (synchIterations ? 1 : 0);
+        result = 31 * result + threads;
+        result = 31 * result + Arrays.hashCode(threadGroups);
+        result = 31 * result + forks;
+        result = 31 * result + warmupForks;
+        result = 31 * result + warmup.hashCode();
+        result = 31 * result + iteration.hashCode();
+        return result;
+    }
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/parameters/IterationParams.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/parameters/IterationParams.java	Mon Nov 25 20:43:49 2013 +0400
@@ -25,7 +25,6 @@
 package org.openjdk.jmh.runner.parameters;
 
 import java.io.Serializable;
-import java.util.Arrays;
 
 /**
  * @author sergey.kuksenko@oracle.com
@@ -33,6 +32,11 @@
 public class IterationParams implements Serializable {
 
     /**
+     * Benchmark parameters
+     */
+    private final BenchmarkParams benchmarkParams;
+
+    /**
      * amount of iterations
      */
     private final int count;
@@ -42,21 +46,11 @@
      */
     private final TimeValue timeValue;
 
-    /**
-     * Thread count
-     */
-    private final int threads;
 
-    /**
-     * Subgroups distribution
-     */
-    private final int[] threadGroups;
-
-    public IterationParams(int count, TimeValue time, int threads, int... threadGroups) {
+    public IterationParams(BenchmarkParams params, int count, TimeValue time) {
         this.count = count;
         this.timeValue = time;
-        this.threads = threads;
-        this.threadGroups = threadGroups;
+        this.benchmarkParams = params;
     }
 
     public int getCount() {
@@ -75,8 +69,6 @@
         IterationParams that = (IterationParams) o;
 
         if (count != that.count) return false;
-        if (threads != that.threads) return false;
-        if (!Arrays.equals(threadGroups, that.threadGroups)) return false;
         if (timeValue != null ? !timeValue.equals(that.timeValue) : that.timeValue != null) return false;
 
         return true;
@@ -86,8 +78,6 @@
     public int hashCode() {
         int result = count;
         result = 31 * result + (timeValue != null ? timeValue.hashCode() : 0);
-        result = 31 * result + threads;
-        result = 31 * result + (threadGroups != null ? Arrays.hashCode(threadGroups) : 0);
         return result;
     }
 
@@ -96,11 +86,8 @@
         return "IterationParams("+ getCount()+", "+ getTime()+")";
     }
 
-    public int getThreads() {
-        return threads;
+    public BenchmarkParams getBenchmarkParams() {
+        return benchmarkParams;
     }
 
-    public int[] getThreadGroups() {
-        return threadGroups;
-    }
 }
--- a/jmh-core/src/test/java/org/openjdk/jmh/logic/results/TestAggregateResult.java	Mon Nov 25 18:20:16 2013 +0400
+++ b/jmh-core/src/test/java/org/openjdk/jmh/logic/results/TestAggregateResult.java	Mon Nov 25 20:43:49 2013 +0400
@@ -46,7 +46,7 @@
 
     @BeforeClass
     public static void setupClass() {
-        result = new IterationResult(new BenchmarkRecord("blah", "blah", Mode.AverageTime, 1), new IterationParams(1, TimeValue.days(1), 1));
+        result = new IterationResult(new BenchmarkRecord("blah", "blah", Mode.AverageTime, 1), new IterationParams(null, 1, TimeValue.days(1)));
         for (double d : values) {
             result.addResult(new ThroughputResult(ResultRole.BOTH, "test1", (long) d, 10 * 1000 * 1000));
         }