Package org.openjdk.jmh.runner.options
Class CommandLineOptions
java.lang.Object
org.openjdk.jmh.runner.options.CommandLineOptions
- All Implemented Interfaces:
Serializable,Options
Class that handles all the command line options.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBenchmarks modes to execute.Which benchmarks to omit?Fork countWhich benchmarks to execute?getJvm()JVM executable to use for forksJVM parameters to use with forksJVM parameters to use with forks (these options will be appended after any other JVM option)JVM parameters to use with forks (these options will be prepended before any other JVM option)Number of batch size for measurementNumber of measurement iterationsThe duration for measurement iterationsOperations per invocation.Which file to use for dumping the outputgetParameter(String name) The overridden value of the parameter.Profilers to use for the run.Which file to use for dumping the resultResult format to useOptional<int[]>Thread subgroups distribution.Number of threads to runTimeout: how long to wait for an iteration to complete.Timeunit to use in units.Number of batch size for warmupNumber of initial forks to ignore the results forWhich benchmarks to warmup before doing the run.Number of warmup iterationsWarmup mode.The duration for warmup iterationsvoidvoidShould force GC between iterations?Should harness terminate on first error encountered?booleanbooleanbooleanbooleanbooleanShould synchronize iterations?voidshowHelp()treatQuoted(joptsimple.OptionSet set, joptsimple.OptionSpec<String> spec) How verbose should we be?
-
Constructor Details
-
CommandLineOptions
Parses the given command line.- Parameters:
argv- argument list- Throws:
CommandLineOptionException- if some options are misspelled
-
-
Method Details
-
treatQuoted
public Optional<Collection<String>> treatQuoted(joptsimple.OptionSet set, joptsimple.OptionSpec<String> spec) -
showHelp
- Throws:
IOException
-
listProfilers
public void listProfilers() -
listResultFormats
public void listResultFormats() -
shouldList
public boolean shouldList() -
shouldListWithParams
public boolean shouldListWithParams() -
shouldListResultFormats
public boolean shouldListResultFormats() -
shouldHelp
public boolean shouldHelp() -
shouldListProfilers
public boolean shouldListProfilers() -
getWarmupMode
Description copied from interface:OptionsWarmup mode.- Specified by:
getWarmupModein interfaceOptions- Returns:
- warmup mode
- See Also:
-
getIncludes
Description copied from interface:OptionsWhich benchmarks to execute?- Specified by:
getIncludesin interfaceOptions- Returns:
- list of regexps matching the requested benchmarks
-
getExcludes
Description copied from interface:OptionsWhich benchmarks to omit?- Specified by:
getExcludesin interfaceOptions- Returns:
- list of regexps matching the ignored benchmarks
-
getWarmupIncludes
Description copied from interface:OptionsWhich benchmarks to warmup before doing the run.- Specified by:
getWarmupIncludesin interfaceOptions- Returns:
- list of regexps matching the relevant benchmarks; empty if no benchmarks are defined
-
getJvm
Description copied from interface:OptionsJVM executable to use for forks -
getJvmArgs
Description copied from interface:OptionsJVM parameters to use with forks- Specified by:
getJvmArgsin interfaceOptions- Returns:
- JVM parameters
- See Also:
-
getJvmArgsAppend
Description copied from interface:OptionsJVM parameters to use with forks (these options will be appended after any other JVM option)- Specified by:
getJvmArgsAppendin interfaceOptions- Returns:
- JVM parameters
- See Also:
-
getJvmArgsPrepend
Description copied from interface:OptionsJVM parameters to use with forks (these options will be prepended before any other JVM option)- Specified by:
getJvmArgsPrependin interfaceOptions- Returns:
- JVM parameters
- See Also:
-
getParameter
Description copied from interface:OptionsThe overridden value of the parameter.- Specified by:
getParameterin interfaceOptions- Parameters:
name- parameter name- Returns:
- parameter
- See Also:
-
getForkCount
Description copied from interface:OptionsFork count- Specified by:
getForkCountin interfaceOptions- Returns:
- fork count; 0, to prohibit forking
- See Also:
-
getWarmupForkCount
Description copied from interface:OptionsNumber of initial forks to ignore the results for- Specified by:
getWarmupForkCountin interfaceOptions- Returns:
- initial fork count; 0, to disable
- See Also:
-
getOutput
Description copied from interface:OptionsWhich file to use for dumping the output -
getResultFormat
Description copied from interface:OptionsResult format to use- Specified by:
getResultFormatin interfaceOptions- Returns:
- format type
-
getResult
Description copied from interface:OptionsWhich file to use for dumping the result -
getMeasurementIterations
Description copied from interface:OptionsNumber of measurement iterations- Specified by:
getMeasurementIterationsin interfaceOptions- Returns:
- number of measurement iterations
- See Also:
-
getMeasurementBatchSize
Description copied from interface:OptionsNumber of batch size for measurement- Specified by:
getMeasurementBatchSizein interfaceOptions- Returns:
- number of batch size for measurement
- See Also:
-
getMeasurementTime
Description copied from interface:OptionsThe duration for measurement iterations- Specified by:
getMeasurementTimein interfaceOptions- Returns:
- duration
- See Also:
-
getWarmupTime
Description copied from interface:OptionsThe duration for warmup iterations- Specified by:
getWarmupTimein interfaceOptions- Returns:
- duration
- See Also:
-
getWarmupIterations
Description copied from interface:OptionsNumber of warmup iterations- Specified by:
getWarmupIterationsin interfaceOptions- Returns:
- number of warmup iterations
- See Also:
-
getWarmupBatchSize
Description copied from interface:OptionsNumber of batch size for warmup- Specified by:
getWarmupBatchSizein interfaceOptions- Returns:
- number of batch size for warmup
- See Also:
-
getThreads
Description copied from interface:OptionsNumber of threads to run- Specified by:
getThreadsin interfaceOptions- Returns:
- number of threads; 0 to use maximum number of threads
- See Also:
-
getThreadGroups
Description copied from interface:OptionsThread subgroups distribution.- Specified by:
getThreadGroupsin interfaceOptions- Returns:
- array of thread ratios
- See Also:
-
shouldDoGC
Description copied from interface:OptionsShould force GC between iterations?- Specified by:
shouldDoGCin interfaceOptions- Returns:
- should GC?
-
shouldSyncIterations
Description copied from interface:OptionsShould synchronize iterations?- Specified by:
shouldSyncIterationsin interfaceOptions- Returns:
- should we?
-
verbosity
Description copied from interface:OptionsHow verbose should we be? -
getTimeUnit
Description copied from interface:OptionsTimeunit to use in units.- Specified by:
getTimeUnitin interfaceOptions- Returns:
- timeunit
- See Also:
-
getOperationsPerInvocation
Description copied from interface:OptionsOperations per invocation.- Specified by:
getOperationsPerInvocationin interfaceOptions- Returns:
- operations per invocation.
- See Also:
-
shouldFailOnError
Description copied from interface:OptionsShould harness terminate on first error encountered?- Specified by:
shouldFailOnErrorin interfaceOptions- Returns:
- should terminate?
-
getProfilers
Description copied from interface:OptionsProfilers to use for the run. Profilers will start in the order specified by collection, and will stop in the reverse order.- Specified by:
getProfilersin interfaceOptions- Returns:
- profilers to use; empty collection if no profilers are required
-
getBenchModes
Description copied from interface:OptionsBenchmarks modes to execute.- Specified by:
getBenchModesin interfaceOptions- Returns:
- modes to execute the benchmarks in; empty to use the default modes
- See Also:
-
getTimeout
Description copied from interface:OptionsTimeout: how long to wait for an iteration to complete.- Specified by:
getTimeoutin interfaceOptions- Returns:
- duration
-