OpenJDK JMH is "the definitive" Java benchmarking tool. Using the sbt-jmh plugin you can write and run these benchmark seamlessly within SBT.
This template simply includes the sbt-jhm plugin, which does all the work to make JMH work with SBT.
- Download Typesafe Activator (or copy it over from a USB)
- Extract the zip and run the
activator
oractivator.bat
script from a non-interactive shell - Your browser should open to the Activator UI: http://localhost:8888
This template includes one example benchmark, but in order to fully understand JMH it's recomended to check out the OpenJDK repository with all JMH samples.
If you want to use an IDE (Eclipse or IntelliJ), click on Code, select Open, and then select your IDE. This will walk you through the steps to generate the project files and open the project. Alternatively you can edit files in the Activator UI.
The latest version of sbt-jmh can be found on: https://github.com/ktoso/sbt-jmh.