Class Runner
java.lang.Object
org.openjdk.jmh.runner.BaseRunner
org.openjdk.jmh.runner.Runner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final Stringprivate static final Booleanprivate final BenchmarkListprivate static final intFields inherited from class BaseRunner
options, out -
Constructor Summary
ConstructorsConstructorDescriptionCreate Runner with the given options.Runner(Options options, OutputFormat format) Create runner with the custom OutputFormat. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddClasspath(List<String> command) private static OutputFormatcreateOutputFormat(Options options) private List<IterationResult> doFork(BinaryLinkServer reader, List<String> commandString, File stdOut, File stdErr, boolean printOut, boolean printErr) private List<WorkloadParams> private List<ActionPlan> getActionPlans(Set<BenchmarkListEntry> benchmarks) getForkedMainCommand(BenchmarkParams benchmark, List<ExternalProfiler> profilers, String host, int port) private Collection<RunResult> voidlist()Print matching benchmarks into output.voidlistWithParams(CommandLineOptions options) Print matching benchmarks with parameters into output.mergeRunResults(Multimap<BenchmarkParams, BenchmarkResult> results) private ActionnewAction(BenchmarkListEntry br, ActionMode mode) private BenchmarkParamsnewBenchmarkParams(BenchmarkListEntry benchmark, ActionMode mode) run()Run benchmarks.private Collection<RunResult> runBenchmarks(SortedSet<BenchmarkListEntry> benchmarks) private Multimap<BenchmarkParams, BenchmarkResult> runSeparate(ActionPlan actionPlan) Shortcut method for the single benchmark execution.Methods inherited from class BaseRunner
etaAfterBenchmark, etaAfterBenchmarks, etaBeforeBenchmark, etaBeforeBenchmarks, runBenchmark, runBenchmark, runBenchmarksEmbedded, runBenchmarksForked, runSystemGC
-
Field Details
-
TAIL_LINES_ON_ERROR
private static final int TAIL_LINES_ON_ERROR -
JMH_LOCK_FILE
-
JMH_LOCK_IGNORE
-
list
-
cpuCount
private int cpuCount
-
-
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
-
createOutputFormat
-
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
-
internalRun
- Throws:
RunnerException
-
getActionPlans
-
newAction
-
newBenchmarkParams
-
explodeAllParams
- Throws:
RunnerException
-
runBenchmarks
private Collection<RunResult> runBenchmarks(SortedSet<BenchmarkListEntry> benchmarks) throws RunnerException - Throws:
RunnerException
-
mergeRunResults
-
runSeparate
-
doFork
private List<IterationResult> doFork(BinaryLinkServer reader, List<String> commandString, File stdOut, File stdErr, boolean printOut, boolean printErr) -
getForkedMainCommand
List<String> getForkedMainCommand(BenchmarkParams benchmark, List<ExternalProfiler> profilers, String host, int port) - Parameters:
host- host VM hostport- host VM port- Returns:
-
getPrintPropertiesCommand
-
addClasspath
-