Package org.openjdk.jmh.runner
Class Runner
java.lang.Object
org.openjdk.jmh.runner.Runner
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate Runner with the given options.Runner(Options options, OutputFormat format) Create runner with the custom OutputFormat. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidetaAfterBenchmark(BenchmarkParams params) protected voidprotected voidprotected voidetaBeforeBenchmarks(Collection<ActionPlan> plans) voidlist()Print matching benchmarks into output.voidlistWithParams(CommandLineOptions options) Print matching benchmarks with parameters into output.run()Run benchmarks.protected voidrunBenchmark(BenchmarkParams benchParams, org.openjdk.jmh.runner.BenchmarkHandler handler, org.openjdk.jmh.runner.IterationResultAcceptor acceptor) protected Multimap<BenchmarkParams,BenchmarkResult> runBenchmarksEmbedded(ActionPlan actionPlan) protected voidrunBenchmarksForked(ActionPlan actionPlan, org.openjdk.jmh.runner.IterationResultAcceptor acceptor) Shortcut method for the single benchmark execution.booleanExecute System.gc() if we the System.gc option is set.
-
Field Details
-
options
-
out
-
-
Constructor Details
-
Runner
Create runner with the custom OutputFormat.- Parameters:
options- options to useformat- OutputFormat to use
-
Runner
Create Runner with the given options. This method sets up theOutputFormatas mandated by options.- Parameters:
options- options to use.
-
-
Method Details
-
list
public void list()Print matching benchmarks into output. -
listWithParams
Print matching benchmarks with parameters into output.- Parameters:
options- options to use.
-
runSingle
Shortcut method for the single benchmark execution. This method is handy when Options describe only the single benchmark to run.- Returns:
- benchmark result
- Throws:
RunnerException- if more than one benchmark is found, or no results are returned
-
run
Run benchmarks.- Returns:
- map of benchmark results
- Throws:
RunnerException- if something goes wrong
-
runBenchmarksForked
protected void runBenchmarksForked(ActionPlan actionPlan, org.openjdk.jmh.runner.IterationResultAcceptor acceptor) -
runBenchmarksEmbedded
-
etaAfterBenchmark
-
etaBeforeBenchmarks
-
etaBeforeBenchmark
protected void etaBeforeBenchmark() -
etaAfterBenchmarks
protected void etaAfterBenchmarks() -
runBenchmark
protected void runBenchmark(BenchmarkParams benchParams, org.openjdk.jmh.runner.BenchmarkHandler handler, org.openjdk.jmh.runner.IterationResultAcceptor acceptor) -
runSystemGC
public boolean runSystemGC()Execute System.gc() if we the System.gc option is set.- Returns:
- true if we did
-