Build and run the JMH benchmark
./gradlew clean jmh
Jmh output
# Run complete. Total time: 00:00:31 REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial experiments, perform baseline and negative tests that provide experimental control, make sure the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts. Do not assume the numbers tell you what you want them to tell. Benchmark Mode Cnt Score Error Units MicrometerBenchmark.counterBenchmark avgt 6 22.707 ± 22.259 ns/op MicrometerBenchmark.gaugeBenchmark avgt 6 29.539 ± 63.616 ns/op MicrometerBenchmark.histogramBenchmark avgt 6 55.462 ± 1.185 ns/op Benchmark result is saved to /home/joost/dev/hobby/demo-kotlin-jmh-micrometer-benchmark/build/reports/jmh/results.txt Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 44s 6 actionable tasks: 6 executed 22:00:40: Tasks execution finished 'clean jmh'.