JMH is a tool for measuring Java code performance, primarily focused on microbenchmarks.
To create a new project that supports JMH run with maven:
$ mvn archetype:generate \
-DinteractiveMode=false \
-DarchetypeGroupId=org.openjdk.jmh \
-DarchetypeArtifactId=jmh-java-benchmark-archetype \
-DgroupId=com.company \
-DartifactId=jmhTest \
-Dversion=1.0
Run this Maven command in the root folder of your project:
mvn clean install
Run this Maven command in the root folder of your project:
java -jar target/benchmarks.jar