Pass JMH options at invocation time using --jmhArgs
masterFor one-off runs where you want to change parameters (like thread count or iterations) without modifying your build.gradle, use the --jmhArgs flag. This flag is tokenized on whitespace and passed directly to the JMH runner.
Precedence: --jmhArgs takes precedence over options defined in the jmh { ... } block.
Warning: Because --jmhArgs is split on whitespace, it cannot correctly handle options where the value contains spaces (e.g., -p "a=1 b=2"). For such cases, use the jmhOptions property in the build.gradle file instead.
./gradlew jmh --jmhArgs="-t 4 -wi 5 -i 10"