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 Details

    • MPSC_QUEUE_OPTION

      public static final String MPSC_QUEUE_OPTION
      CLI option selecting the intrusive or JDK timestamp queue.
      See Also:
  • Constructor Details

    • SbkParameters

      public SbkParameters(String name, String desc)
      Construct parameters with the given benchmark name and description. Registers the standard SBK options and default values.
      Parameters:
      name - benchmark name
      desc - help description
    • SbkParameters

      public SbkParameters(String name)
      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 throw HelpException via the superclass when help is requested.
      Specified by:
      parseArgs in interface ParseInputOptions
      Overrides:
      parseArgs in class SbkInputOptions
      Parameters:
      args - command-line arguments to parse
      Throws:
      org.apache.commons.cli.ParseException - if an option cannot be parsed
      IllegalArgumentException - if an option value or combination is invalid
      HelpException - if help was requested
    • loadPerlConfig

      public static io.perl.config.PerlConfig loadPerlConfig() throws IOException
      Load the PerL defaults bundled with the SBK application.
      Returns:
      property-backed PerL configuration
      Throws:
      IOException - if sbk.properties is missing or invalid