--- old/jmh-core/src/main/java/org/openjdk/jmh/infra/BenchmarkParams.java 2014-09-10 23:41:07.243382329 +0400 +++ new/jmh-core/src/main/java/org/openjdk/jmh/infra/BenchmarkParams.java 2014-09-10 23:41:07.155379790 +0400 @@ -28,6 +28,7 @@ import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.runner.WorkloadParams; +import org.openjdk.jmh.runner.options.TimeValue; import org.openjdk.jmh.util.Utils; import java.io.Serializable; @@ -74,13 +75,14 @@ IterationParams warmup, IterationParams measurement, Mode mode, WorkloadParams params, TimeUnit timeUnit, int opsPerInvocation, - String jvm, Collection jvmArgs) { + String jvm, Collection jvmArgs, + TimeValue timeout) { super(benchmark, generatedTarget, synchIterations, threads, threadGroups, forks, warmupForks, warmup, measurement, mode, params, timeUnit, opsPerInvocation, - jvm, jvmArgs); + jvm, jvmArgs, timeout); } } @@ -93,13 +95,15 @@ IterationParams warmup, IterationParams measurement, Mode mode, WorkloadParams params, TimeUnit timeUnit, int opsPerInvocation, - String jvm, Collection jvmArgs) { + String jvm, Collection jvmArgs, + TimeValue timeout) { super(benchmark, generatedTarget, synchIterations, threads, threadGroups, forks, warmupForks, warmup, measurement, mode, params, timeUnit, opsPerInvocation, - jvm, jvmArgs); + jvm, jvmArgs, + timeout); } public BenchmarkParamsL4(BenchmarkParams other) { @@ -132,13 +136,15 @@ IterationParams warmup, IterationParams measurement, Mode mode, WorkloadParams params, TimeUnit timeUnit, int opsPerInvocation, - String jvm, Collection jvmArgs) { + String jvm, Collection jvmArgs, + TimeValue timeout) { super(benchmark, generatedTarget, synchIterations, threads, threadGroups, forks, warmupForks, warmup, measurement, mode, params, timeUnit, opsPerInvocation, - jvm, jvmArgs); + jvm, jvmArgs, + timeout); } public BenchmarkParamsL3(BenchmarkParams other) { @@ -187,13 +193,15 @@ protected final int opsPerInvocation; protected final String jvm; protected final Collection jvmArgs; + protected final TimeValue timeout; public BenchmarkParamsL2(String benchmark, String generatedTarget, boolean synchIterations, int threads, int[] threadGroups, int forks, int warmupForks, IterationParams warmup, IterationParams measurement, Mode mode, WorkloadParams params, TimeUnit timeUnit, int opsPerInvocation, - String jvm, Collection jvmArgs) { + String jvm, Collection jvmArgs, + TimeValue timeout) { this.benchmark = benchmark; this.generatedTarget = generatedTarget; this.synchIterations = synchIterations; @@ -209,6 +217,7 @@ this.opsPerInvocation = opsPerInvocation; this.jvm = jvm; this.jvmArgs = jvmArgs; + this.timeout = timeout; } public BenchmarkParamsL2(BenchmarkParams other) { @@ -227,6 +236,14 @@ this.opsPerInvocation = other.opsPerInvocation; this.jvm = other.jvm; this.jvmArgs = other.jvmArgs; + this.timeout = other.timeout; + } + + /** + * @return how long to wait for iteration to complete + */ + public TimeValue getTimeout() { + return timeout; } /**