According to the dictionary, a benchmark is a standard or point of reference against which things may be compared or assessed. In programming, it is the way to compare the performance of applications, or just methods. The micro preface is focused on the latter—the smaller code fragments rather than an application as a whole. The JMH is a framework for measuring the performance of a single method.
That may appear to be very useful. Can we not just run a method a thousand or a hundred thousand times in a loop, measure how long it took, and then calculate the average of the method performance? We can. The problem is that JVM is a much more complicated program than just a code-executing machine. It has optimization algorithms focused on making the application code run as fast as possible.
For example, let's look at the following class:
class SomeClass {
...