Package org.openjdk.jmh.runner
Class BaseRunner
- java.lang.Object
-
- org.openjdk.jmh.runner.BaseRunner
-
- Direct Known Subclasses:
ForkedRunner
,Runner
abstract class BaseRunner extends java.lang.Object
Abstract runner, the base class for Runner and ForkedRunner.
-
-
Field Summary
Fields Modifier and Type Field Description private long
actualRunningTime
private long
benchmarkStart
protected Options
options
protected OutputFormat
out
private long
projectedRunningTime
private long
projectedTotalTime
-
Constructor Summary
Constructors Constructor Description BaseRunner(Options options, OutputFormat handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
doSingle(BenchmarkParams params, ActionMode mode, IterationResultAcceptor acceptor)
private long
estimateTimeSingleFork(BenchmarkParams params)
protected void
etaAfterBenchmark(BenchmarkParams params)
protected void
etaAfterBenchmarks()
protected void
etaBeforeBenchmark()
protected void
etaBeforeBenchmarks(java.util.Collection<ActionPlan> plans)
private java.lang.String
formatDuration(long nanos)
protected void
runBenchmark(BenchmarkParams benchParams, BenchmarkHandler handler, IterationResultAcceptor acceptor)
(package private) void
runBenchmark(BenchmarkParams benchParams, IterationResultAcceptor acceptor)
protected Multimap<BenchmarkParams,BenchmarkResult>
runBenchmarksEmbedded(ActionPlan actionPlan)
protected void
runBenchmarksForked(ActionPlan actionPlan, IterationResultAcceptor acceptor)
boolean
runSystemGC()
Execute System.gc() if we the System.gc option is set.
-
-
-
Field Detail
-
projectedTotalTime
private long projectedTotalTime
-
projectedRunningTime
private long projectedRunningTime
-
actualRunningTime
private long actualRunningTime
-
benchmarkStart
private long benchmarkStart
-
options
protected final Options options
-
out
protected final OutputFormat out
-
-
Constructor Detail
-
BaseRunner
public BaseRunner(Options options, OutputFormat handler)
-
-
Method Detail
-
runBenchmarksForked
protected void runBenchmarksForked(ActionPlan actionPlan, IterationResultAcceptor acceptor)
-
runBenchmarksEmbedded
protected Multimap<BenchmarkParams,BenchmarkResult> runBenchmarksEmbedded(ActionPlan actionPlan)
-
doSingle
private void doSingle(BenchmarkParams params, ActionMode mode, IterationResultAcceptor acceptor)
-
etaAfterBenchmark
protected void etaAfterBenchmark(BenchmarkParams params)
-
etaBeforeBenchmarks
protected void etaBeforeBenchmarks(java.util.Collection<ActionPlan> plans)
-
estimateTimeSingleFork
private long estimateTimeSingleFork(BenchmarkParams params)
-
etaBeforeBenchmark
protected void etaBeforeBenchmark()
-
etaAfterBenchmarks
protected void etaAfterBenchmarks()
-
formatDuration
private java.lang.String formatDuration(long nanos)
-
runBenchmark
void runBenchmark(BenchmarkParams benchParams, IterationResultAcceptor acceptor)
-
runBenchmark
protected void runBenchmark(BenchmarkParams benchParams, BenchmarkHandler handler, IterationResultAcceptor acceptor)
-
runSystemGC
public boolean runSystemGC()
Execute System.gc() if we the System.gc option is set.- Returns:
- true if we did
-
-