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 ChainedOptionsBuilderaddProfiler(Class<? extends Profiler> profiler)Add the profiler in the runChainedOptionsBuilderaddProfiler(Class<? extends Profiler> profiler, String initLine)Add the profiler in the runChainedOptionsBuilderaddProfiler(String profiler)Add the profiler in the runChainedOptionsBuilderaddProfiler(String profiler, String initLine)Add the profiler in the runOptionsbuild()Produce the final OptionsChainedOptionsBuilderdetectJvmArgs()Autodetect forked JVM arguments from the parent VM.ChainedOptionsBuilderexclude(String regexp)Exclude benchmarks from the run (Can be used multiple times)ChainedOptionsBuilderforks(int value)Number of forks to use in the runChainedOptionsBuilderinclude(String regexp)Include benchmark in the run (Can be used multiple times)ChainedOptionsBuilderincludeWarmup(String regexp)What other benchmarks to warmup along the wayChainedOptionsBuilderjvm(String path)Forked JVM to use.ChainedOptionsBuilderjvmArgs(String... value)Forked JVM arguments.ChainedOptionsBuilderjvmArgsAppend(String... value)Append forked JVM arguments: These options go after other options.ChainedOptionsBuilderjvmArgsPrepend(String... value)Prepend forked JVM arguments: These options go before any other options.ChainedOptionsBuildermeasurementBatchSize(int value)How large measurement batchSize should be?ChainedOptionsBuildermeasurementIterations(int count)How many measurement measurementIterations to doChainedOptionsBuildermeasurementTime(TimeValue value)How long each measurement iteration should take?ChainedOptionsBuildermode(Mode mode)Benchmark mode.ChainedOptionsBuilderoperationsPerInvocation(int value)Operations per invocation.ChainedOptionsBuilderoutput(String filename)Output filename to write the run log toChainedOptionsBuilderparam(String name, String... values)Set benchmark parameter values.ChainedOptionsBuilderparent(Options other)Override the defaults from the given option.ChainedOptionsBuilderresult(String filename)Output filename to write the result toChainedOptionsBuilderresultFormat(ResultFormatType type)ResultFormatType to use in the runChainedOptionsBuildershouldDoGC(boolean value)Should do GC between measurementIterations?ChainedOptionsBuildershouldFailOnError(boolean value)Should fail on first benchmark error?ChainedOptionsBuildersyncIterations(boolean value)Should synchronize measurementIterations?ChainedOptionsBuilderthreadGroups(int... groups)Subgroups thread distribution.ChainedOptionsBuilderthreads(int count)Number of threads to run the benchmark inChainedOptionsBuildertimeout(TimeValue value)How long to wait for iteration execution?ChainedOptionsBuildertimeUnit(TimeUnit tu)Timeunit to use in resultsChainedOptionsBuilderverbosity(VerboseMode mode)Control verbosity level.ChainedOptionsBuilderwarmupBatchSize(int value)How large warmup batchSize should be?ChainedOptionsBuilderwarmupForks(int value)Number of ignored forksChainedOptionsBuilderwarmupIterations(int value)How many warmup iterations to do?ChainedOptionsBuilderwarmupMode(WarmupMode mode)Warmup mode to useChainedOptionsBuilderwarmupTime(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
-
-