Class SbkParameters
java.lang.Object
io.sbk.params.impl.SbkInputOptions
io.sbk.params.impl.SbkParameters
- All Implemented Interfaces:
ActionParameter, InputOptions, InputParameterOptions, ParameterOptions, Parameters, ParsedOptions, ParseInputOptions, ThreadTypeParameter
- Direct Known Subclasses:
SbkDriversParameters
public sealed class SbkParameters
extends SbkInputOptions
implements InputParameterOptions
permits SbkDriversParameters
Parses and exposes common SBK benchmark parameters.
Builds the CLI schema for core options (writers/readers, size, records, seconds,
throughput, step controls, read-only, idle sleep) and maps parsed values into
typed getters via Lombok Getter annotations.
Semantics (high-level): - **writers/readers**: concurrency configuration; at least one must be > 0. - **size**: record size (bytes); required if workers > 0. - **records/seconds/throughput**: determine rate control and runtime. - **wstep/wsec, rstep/rsec**: step ramping configuration. - **ro**: read-only when both writers and readers are set. - **millisecsleep**: idle sleep in milliseconds between operations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCLI option selecting the intrusive or JDK timestamp queue. -
Constructor Summary
ConstructorsConstructorDescriptionSbkParameters(String name) Construct parameters using the default description.SbkParameters(String name, String desc) Construct parameters with the given benchmark name and description. -
Method Summary
Modifier and TypeMethodDescriptionstatic io.perl.config.PerlConfigLoad the PerL defaults bundled with the SBK application.voidParse SBK core options and compute derived values (e.g., recordsPerSec, totalSecondsToRun).Methods inherited from class SbkInputOptions
addOption, getHelpText, getOptionValue, getOptionValue, hasOption, hasOptionValueMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ActionParameter
getActionMethods inherited from interface InputOptions
addOption, hasOptionMethods inherited from interface Parameters
getIdleSleepMilliSeconds, getReadersCount, getReadersStep, getReadersStepSeconds, getRecordSize, getRecordsPerSec, getRecordsPerSync, getTimeoutMS, getTotalRecords, getTotalSecondsToRun, getWritersCount, getWritersStep, getWritersStepSeconds, isMpscQueueEnabledMethods inherited from interface ParsedOptions
getHelpText, getOptionValue, getOptionValue, hasOptionValue, printHelpMethods inherited from interface ThreadTypeParameter
getThreadType
-
Field Details
-
MPSC_QUEUE_OPTION
CLI option selecting the intrusive or JDK timestamp queue.- See Also:
-
-
Constructor Details
-
SbkParameters
-
SbkParameters
Construct parameters using the default description.- Parameters:
name- benchmark name
-
-
Method Details
-
parseArgs
public void parseArgs(String[] args) throws org.apache.commons.cli.ParseException, IllegalArgumentException, HelpException Parse SBK core options and compute derived values (e.g., recordsPerSec, totalSecondsToRun). Validates required combinations (e.g., at least one of writers/readers must be > 0). May throwHelpExceptionvia the superclass when help is requested.- Specified by:
parseArgsin interfaceParseInputOptions- Overrides:
parseArgsin classSbkInputOptions- Parameters:
args- command-line arguments to parse- Throws:
org.apache.commons.cli.ParseException- if an option cannot be parsedIllegalArgumentException- if an option value or combination is invalidHelpException- if help was requested
-
loadPerlConfig
Load the PerL defaults bundled with the SBK application.- Returns:
- property-backed PerL configuration
- Throws:
IOException- ifsbk.propertiesis missing or invalid
-