Java Microbenchmark Harness (JMH) A quick hands-on lesson to learn about Java Microbenchmark Harness (JMH). The article helps you get started and configure JMH project. by Introduction jvm. It is not enough to surround the code in a loop with System.out.println() and gather the time measurements. While benchmarking, a developer should consider warm-up cycles, JIT compilations, JVM optimizations, avoiding usual pitfalls, and even more. Thankfully, OpenJDK has a great tool Java Microbenchmark Harness (JMH) that can help us generated benchmarking stats. In this article, we will discuss how JMH can help us avoid the pitfalls that we have discussed earlier.