A word of caution
The described harness takes away most of the worries of the programmer who measures the performance. And yet, it is virtually impossible to cover all the cases of JVM optimization, profile sharing, and similar aspects of JVM implementation, especially if we take into account that JVM code evolves and differs from one implementation to another. The authors of JMH acknowledge this fact by printing the following warning along with the test results:
The description of the profilers and their usage can be found in the openjdk
project (http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples). Among the same samples, you will encounter a description of the code generated by JMH, based on the annotations.
If you would like to get really deep into the details of your code execution and testing, there is no better way to do it than to study the generated code. It describes all...