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.ObjectAbstract runner, the base class for Runner and ForkedRunner.
-
-
Field Summary
Fields Modifier and Type Field Description private longactualRunningTimeprivate longbenchmarkStartprotected Optionsoptionsprotected OutputFormatoutprivate longprojectedRunningTimeprivate longprojectedTotalTime
-
Constructor Summary
Constructors Constructor Description BaseRunner(Options options, OutputFormat handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddoSingle(BenchmarkParams params, ActionMode mode, IterationResultAcceptor acceptor)private longestimateTimeSingleFork(BenchmarkParams params)protected voidetaAfterBenchmark(BenchmarkParams params)protected voidetaAfterBenchmarks()protected voidetaBeforeBenchmark()protected voidetaBeforeBenchmarks(java.util.Collection<ActionPlan> plans)private java.lang.StringformatDuration(long nanos)protected voidrunBenchmark(BenchmarkParams benchParams, BenchmarkHandler handler, IterationResultAcceptor acceptor)(package private) voidrunBenchmark(BenchmarkParams benchParams, IterationResultAcceptor acceptor)protected Multimap<BenchmarkParams,BenchmarkResult>runBenchmarksEmbedded(ActionPlan actionPlan)protected voidrunBenchmarksForked(ActionPlan actionPlan, IterationResultAcceptor acceptor)booleanrunSystemGC()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
-
-