Benchmarks here are generally in src/main and can be run with benchmark/jmh:run
within SBT.
See here for more details: SBT-JMH JMS-Samples
Flamegraphs are a great tool to figure out where processing time is spent. You can create one by following these steps
You should have jfr-flame-graph and FlameGraph installed or rather runnable on you machine.
You also need the environment variable FLAMEGRAPH_DIR set to the path of the
FlameGraph by Brandan Gregg.
- Create a flight record of the benchmark run by passing
-prof jmh.extras.JFRto the run, e.g.sbt "benchmark/jmh:run -prof jmh.extras.JFR -i 1 -wi 3 -f1 -t1 .*GroupManagerBenchmark". This will produce a.jfrfile in the benchmark folder. - Create a flamegraph SVG file with
<path to jfr-flame-graph>/create_flamegraph.sh -f <path to jfr file> -i > flamegraph.svg.