public class Runner extends BaseRunner
Modifier and Type | Field and Description |
---|---|
private int |
cpuCount |
private static java.lang.String |
JMH_LOCK_FILE |
private static java.lang.Boolean |
JMH_LOCK_IGNORE |
private BenchmarkList |
list |
private static int |
TAIL_LINES_ON_ERROR |
options, out
Constructor and Description |
---|
Runner(Options options)
Create Runner with the given options.
|
Runner(Options options,
OutputFormat format)
Create runner with the custom OutputFormat.
|
Modifier and Type | Method and Description |
---|---|
private static OutputFormat |
createOutputFormat(Options options) |
private java.util.List<IterationResult> |
doFork(BinaryLinkServer reader,
java.util.List<java.lang.String> commandString,
java.io.File stdOut,
java.io.File stdErr,
boolean printOut,
boolean printErr) |
private java.util.List<WorkloadParams> |
explodeAllParams(BenchmarkListEntry br) |
private java.util.List<ActionPlan> |
getActionPlans(java.util.Set<BenchmarkListEntry> benchmarks) |
(package private) java.util.List<java.lang.String> |
getForkedMainCommand(BenchmarkParams benchmark,
java.util.List<ExternalProfiler> profilers,
java.lang.String host,
int port) |
(package private) java.util.List<java.lang.String> |
getVersionMainCommand(BenchmarkParams benchmark) |
private java.util.Collection<RunResult> |
internalRun() |
void |
list()
Print matching benchmarks into output.
|
void |
listWithParams(CommandLineOptions options)
Print matching benchmarks with parameters into output.
|
private java.util.SortedSet<RunResult> |
mergeRunResults(Multimap<BenchmarkParams,BenchmarkResult> results) |
private Action |
newAction(BenchmarkListEntry br,
ActionMode mode) |
private BenchmarkParams |
newBenchmarkParams(BenchmarkListEntry benchmark,
ActionMode mode) |
java.util.Collection<RunResult> |
run()
Run benchmarks.
|
private java.util.Collection<RunResult> |
runBenchmarks(java.util.SortedSet<BenchmarkListEntry> benchmarks) |
private Multimap<BenchmarkParams,BenchmarkResult> |
runSeparate(ActionPlan actionPlan) |
RunResult |
runSingle()
Shortcut method for the single benchmark execution.
|
etaAfterBenchmark, etaAfterBenchmarks, etaBeforeBenchmark, etaBeforeBenchmarks, runBenchmark, runBenchmark, runBenchmarksEmbedded, runBenchmarksForked, runSystemGC
private static final int TAIL_LINES_ON_ERROR
private static final java.lang.String JMH_LOCK_FILE
private static final java.lang.Boolean JMH_LOCK_IGNORE
private final BenchmarkList list
private int cpuCount
public Runner(Options options, OutputFormat format)
options
- options to useformat
- OutputFormat to usepublic Runner(Options options)
OutputFormat
as
mandated by options.options
- options to use.private static OutputFormat createOutputFormat(Options options)
public void list()
public void listWithParams(CommandLineOptions options)
options
- public RunResult runSingle() throws RunnerException
RunnerException
- if more than one benchmark is found, or no results are returnedpublic java.util.Collection<RunResult> run() throws RunnerException
RunnerException
- if something goes wrongprivate java.util.Collection<RunResult> internalRun() throws RunnerException
RunnerException
private java.util.List<ActionPlan> getActionPlans(java.util.Set<BenchmarkListEntry> benchmarks)
private Action newAction(BenchmarkListEntry br, ActionMode mode)
private BenchmarkParams newBenchmarkParams(BenchmarkListEntry benchmark, ActionMode mode)
private java.util.List<WorkloadParams> explodeAllParams(BenchmarkListEntry br) throws RunnerException
RunnerException
private java.util.Collection<RunResult> runBenchmarks(java.util.SortedSet<BenchmarkListEntry> benchmarks) throws RunnerException
RunnerException
private java.util.SortedSet<RunResult> mergeRunResults(Multimap<BenchmarkParams,BenchmarkResult> results)
private Multimap<BenchmarkParams,BenchmarkResult> runSeparate(ActionPlan actionPlan)
private java.util.List<IterationResult> doFork(BinaryLinkServer reader, java.util.List<java.lang.String> commandString, java.io.File stdOut, java.io.File stdErr, boolean printOut, boolean printErr)
java.util.List<java.lang.String> getForkedMainCommand(BenchmarkParams benchmark, java.util.List<ExternalProfiler> profilers, java.lang.String host, int port)
host
- host VM hostport
- host VM portjava.util.List<java.lang.String> getVersionMainCommand(BenchmarkParams benchmark)