Performance tests are present at all stages in a Java EE application, and so, there are several ways to write a performance test. In this section, we will go through a few main ones, starting with the simplest one (algorithm validation).
Writing performance tests
JMH – the OpenJDK tool
Java Microbenchmark Harness (JMH) is a small library developed by the OpenJDK team—yes, the same one doing the JVM—which enables you to easily develop microbenchmarks.
A microbenchmark designs a benchmark on a very small part of an application. Most of the time, you can see it as a unit benchmark, using the analogy with unit tests.
Yet, it is something important when setting up performance tests as it will allow you to quickly...