To run from project root directory:
sbt bench/bench
or from an sbt
session:
geotrelllis> project bench
bench> bench
For running the benchmarks in a single file, you can use the benchOnly <path>
input task *from the bench
project, which supports tab completion:
geotrellis> project bench
bench> benchOnly benchOnly geotrellis/raster/GenericRasterBench.scala
Results will be in bench/target/jmh-results-<datestamp>.csv
.
The configuration and execution of the the JMH task is implemented through a custom sbt plugin located at
<base.dir>/project/GTBenchmarkPlugin.scala
. It defines a number of settings that can be configured on a
per-subproject basis:
jmhOutputFormat
: Output format: {text|csv|scsv|json|latex}jmhOutputDir
: Directory for writing JMH resultsjmhFileRegex
: Filename regular expression for selecting files to benchmarkjmhThreads
: Number of JMH worker threadsjmhFork
: How many times to fork a single JMH benchmarkjmhIterations
: Number of measurement iterations to dojmhWarmupIterations
: Number of warmup iterations to dojmhTimeUnit
: Benchmark results time unit: {m|s|ms|us|ns}jmhExtraOptions
: Additional arguments to jmh:run before the filename regex
(For an up-to-date list of settings, refer to the plugin source.)
If you wish to bypass this managed configuration and execute the jmh
command directly, you can do so with the
jmh:run
task. For example
jmh:run -t 1 -f 1 -wi 10 -i 10 .*Bench.*
See the sbt-jmh
documentation for details on running directly.