Package org.openjdk.jmh.runner.options
Interface ChainedOptionsBuilder
-
- All Known Implementing Classes:
OptionsBuilder
public interface ChainedOptionsBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChainedOptionsBuilder
addProfiler(Class<? extends Profiler> profiler)
Add the profiler in the runChainedOptionsBuilder
addProfiler(Class<? extends Profiler> profiler, String initLine)
Add the profiler in the runChainedOptionsBuilder
addProfiler(String profiler)
Add the profiler in the runChainedOptionsBuilder
addProfiler(String profiler, String initLine)
Add the profiler in the runOptions
build()
Produce the final OptionsChainedOptionsBuilder
detectJvmArgs()
Autodetect forked JVM arguments from the parent VM.ChainedOptionsBuilder
exclude(String regexp)
Exclude benchmarks from the run (Can be used multiple times)ChainedOptionsBuilder
forks(int value)
Number of forks to use in the runChainedOptionsBuilder
include(String regexp)
Include benchmark in the run (Can be used multiple times)ChainedOptionsBuilder
includeWarmup(String regexp)
What other benchmarks to warmup along the wayChainedOptionsBuilder
jvm(String path)
Forked JVM to use.ChainedOptionsBuilder
jvmArgs(String... value)
Forked JVM arguments.ChainedOptionsBuilder
jvmArgsAppend(String... value)
Append forked JVM arguments: These options go after other options.ChainedOptionsBuilder
jvmArgsPrepend(String... value)
Prepend forked JVM arguments: These options go before any other options.ChainedOptionsBuilder
measurementBatchSize(int value)
How large measurement batchSize should be?ChainedOptionsBuilder
measurementIterations(int count)
How many measurement measurementIterations to doChainedOptionsBuilder
measurementTime(TimeValue value)
How long each measurement iteration should take?ChainedOptionsBuilder
mode(Mode mode)
Benchmark mode.ChainedOptionsBuilder
operationsPerInvocation(int value)
Operations per invocation.ChainedOptionsBuilder
output(String filename)
Output filename to write the run log toChainedOptionsBuilder
param(String name, String... values)
Set benchmark parameter values.ChainedOptionsBuilder
parent(Options other)
Override the defaults from the given option.ChainedOptionsBuilder
result(String filename)
Output filename to write the result toChainedOptionsBuilder
resultFormat(ResultFormatType type)
ResultFormatType to use in the runChainedOptionsBuilder
shouldDoGC(boolean value)
Should do GC between measurementIterations?ChainedOptionsBuilder
shouldFailOnError(boolean value)
Should fail on first benchmark error?ChainedOptionsBuilder
syncIterations(boolean value)
Should synchronize measurementIterations?ChainedOptionsBuilder
threadGroups(int... groups)
Subgroups thread distribution.ChainedOptionsBuilder
threads(int count)
Number of threads to run the benchmark inChainedOptionsBuilder
timeout(TimeValue value)
How long to wait for iteration execution?ChainedOptionsBuilder
timeUnit(TimeUnit tu)
Timeunit to use in resultsChainedOptionsBuilder
verbosity(VerboseMode mode)
Control verbosity level.ChainedOptionsBuilder
warmupBatchSize(int value)
How large warmup batchSize should be?ChainedOptionsBuilder
warmupForks(int value)
Number of ignored forksChainedOptionsBuilder
warmupIterations(int value)
How many warmup iterations to do?ChainedOptionsBuilder
warmupMode(WarmupMode mode)
Warmup mode to useChainedOptionsBuilder
warmupTime(TimeValue value)
How long each warmup iteration should take?
-
-
-
Method Detail
-
build
Options build()
Produce the final Options- Returns:
- options object.
-
parent
ChainedOptionsBuilder parent(Options other)
Override the defaults from the given option. You may use this only once.- Parameters:
other
- options to base on- Returns:
- builder
-
include
ChainedOptionsBuilder include(String regexp)
Include benchmark in the run (Can be used multiple times)- Parameters:
regexp
- to match benchmarks against- Returns:
- builder
- See Also:
Defaults.INCLUDE_BENCHMARKS
-
exclude
ChainedOptionsBuilder exclude(String regexp)
Exclude benchmarks from the run (Can be used multiple times)- Parameters:
regexp
- to match benchmark against- Returns:
- builder
-
resultFormat
ChainedOptionsBuilder resultFormat(ResultFormatType type)
ResultFormatType to use in the run- Parameters:
type
- resultformat type- Returns:
- builder
- See Also:
Defaults.RESULT_FORMAT
-
output
ChainedOptionsBuilder output(String filename)
Output filename to write the run log to- Parameters:
filename
- file name- Returns:
- builder
-
result
ChainedOptionsBuilder result(String filename)
Output filename to write the result to- Parameters:
filename
- file name- Returns:
- builder
- See Also:
Defaults.RESULT_FILE_PREFIX
-
shouldDoGC
ChainedOptionsBuilder shouldDoGC(boolean value)
Should do GC between measurementIterations?- Parameters:
value
- flag- Returns:
- builder
- See Also:
Defaults.DO_GC
-
addProfiler
ChainedOptionsBuilder addProfiler(Class<? extends Profiler> profiler)
Add the profiler in the run- Parameters:
profiler
- profiler class- Returns:
- builder
-
addProfiler
ChainedOptionsBuilder addProfiler(Class<? extends Profiler> profiler, String initLine)
Add the profiler in the run- Parameters:
profiler
- profiler classinitLine
- profiler options initialization line- Returns:
- builder
-
addProfiler
ChainedOptionsBuilder addProfiler(String profiler)
Add the profiler in the run- Parameters:
profiler
- profiler class name, or profiler alias- Returns:
- builder
-
addProfiler
ChainedOptionsBuilder addProfiler(String profiler, String initLine)
Add the profiler in the run- Parameters:
profiler
- profiler class name, or profiler aliasinitLine
- profiler options initialization line- Returns:
- builder
-
verbosity
ChainedOptionsBuilder verbosity(VerboseMode mode)
Control verbosity level.- Parameters:
mode
- flag- Returns:
- builder
- See Also:
Defaults.VERBOSITY
-
shouldFailOnError
ChainedOptionsBuilder shouldFailOnError(boolean value)
Should fail on first benchmark error?- Parameters:
value
- flag- Returns:
- builder
- See Also:
Defaults.FAIL_ON_ERROR
-
threads
ChainedOptionsBuilder threads(int count)
Number of threads to run the benchmark in- Parameters:
count
- number of threads- Returns:
- builder
- See Also:
Threads
,Defaults.THREADS
-
threadGroups
ChainedOptionsBuilder threadGroups(int... groups)
Subgroups thread distribution.- Parameters:
groups
- thread distribution- Returns:
- builder
- See Also:
Group
,GroupThreads
-
syncIterations
ChainedOptionsBuilder syncIterations(boolean value)
Should synchronize measurementIterations?- Parameters:
value
- flag- Returns:
- builder
- See Also:
Defaults.SYNC_ITERATIONS
-
warmupIterations
ChainedOptionsBuilder warmupIterations(int value)
How many warmup iterations to do?- Parameters:
value
- flag- Returns:
- builder
- See Also:
Warmup
,Defaults.WARMUP_ITERATIONS
,Defaults.WARMUP_ITERATIONS_SINGLESHOT
-
warmupBatchSize
ChainedOptionsBuilder warmupBatchSize(int value)
How large warmup batchSize should be?- Parameters:
value
- batch size- Returns:
- builder
- See Also:
Warmup
,Defaults.WARMUP_BATCHSIZE
-
warmupTime
ChainedOptionsBuilder warmupTime(TimeValue value)
How long each warmup iteration should take?- Parameters:
value
- time- Returns:
- builder
- See Also:
Warmup
,Defaults.WARMUP_TIME
-
warmupMode
ChainedOptionsBuilder warmupMode(WarmupMode mode)
Warmup mode to use- Parameters:
mode
- to use- Returns:
- builder
- See Also:
Defaults.WARMUP_MODE
-
includeWarmup
ChainedOptionsBuilder includeWarmup(String regexp)
What other benchmarks to warmup along the way- Parameters:
regexp
- to match benchmarks against- Returns:
- builder
-
measurementIterations
ChainedOptionsBuilder measurementIterations(int count)
How many measurement measurementIterations to do- Parameters:
count
- number of iterations- Returns:
- builder
- See Also:
Measurement
,Defaults.MEASUREMENT_ITERATIONS
,Defaults.MEASUREMENT_ITERATIONS_SINGLESHOT
-
measurementBatchSize
ChainedOptionsBuilder measurementBatchSize(int value)
How large measurement batchSize should be?- Parameters:
value
- batch size- Returns:
- builder
- See Also:
Measurement
,Defaults.MEASUREMENT_BATCHSIZE
-
measurementTime
ChainedOptionsBuilder measurementTime(TimeValue value)
How long each measurement iteration should take?- Parameters:
value
- time- Returns:
- builder
- See Also:
Measurement
,Defaults.MEASUREMENT_TIME
-
mode
ChainedOptionsBuilder mode(Mode mode)
Benchmark mode. (Can be used multiple times)- Parameters:
mode
- benchmark mode- Returns:
- builder
- See Also:
BenchmarkMode
,Defaults.BENCHMARK_MODE
-
timeUnit
ChainedOptionsBuilder timeUnit(TimeUnit tu)
Timeunit to use in results- Parameters:
tu
- time unit- Returns:
- builder
- See Also:
OutputTimeUnit
,Defaults.OUTPUT_TIMEUNIT
-
operationsPerInvocation
ChainedOptionsBuilder operationsPerInvocation(int value)
Operations per invocation.- Parameters:
value
- operations per invocation.- Returns:
- builder
- See Also:
OperationsPerInvocation
,Defaults.OPS_PER_INVOCATION
-
forks
ChainedOptionsBuilder forks(int value)
Number of forks to use in the run- Parameters:
value
- number of forks- Returns:
- builder
- See Also:
Fork
,Defaults.MEASUREMENT_FORKS
-
warmupForks
ChainedOptionsBuilder warmupForks(int value)
Number of ignored forks- Parameters:
value
- number of ignored forks- Returns:
- builder
- See Also:
Fork
,Defaults.WARMUP_FORKS
-
jvm
ChainedOptionsBuilder jvm(String path)
Forked JVM to use.- Parameters:
path
- path to /bin/java- Returns:
- builder
-
jvmArgs
ChainedOptionsBuilder jvmArgs(String... value)
Forked JVM arguments.- Parameters:
value
- arguments to add to the run- Returns:
- builder
- See Also:
Fork
-
jvmArgsAppend
ChainedOptionsBuilder jvmArgsAppend(String... value)
Append forked JVM arguments: These options go after other options.- Parameters:
value
- arguments to add to the run- Returns:
- builder
- See Also:
Fork
-
jvmArgsPrepend
ChainedOptionsBuilder jvmArgsPrepend(String... value)
Prepend forked JVM arguments: These options go before any other options.- Parameters:
value
- arguments to add to the run- Returns:
- builder
- See Also:
Fork
-
detectJvmArgs
ChainedOptionsBuilder detectJvmArgs()
Autodetect forked JVM arguments from the parent VM. Overrides the jvmArgs(...) value.- Returns:
- builder
-
param
ChainedOptionsBuilder param(String name, String... values)
Set benchmark parameter values. The parameter values would be taken in the order given by user.- Parameters:
name
- parametervalues
- sequence of values to set- Returns:
- builder
- See Also:
Param
-
timeout
ChainedOptionsBuilder timeout(TimeValue value)
How long to wait for iteration execution?- Parameters:
value
- time- Returns:
- builder
- See Also:
Defaults.TIMEOUT
-
-