Chapter 16: Java Microbenchmark Harness
In this chapter, you will learn about a Java Microbenchmark Harness (JMH) project that allows measuring various code performance characteristics. If performance is an important issue for your application, this tool can help you to identify bottlenecks with precision—up to the method level.
In addition to theoretical knowledge, you will have a chance to run JMH using practical demo examples and recommendations.
The following topics will be covered in this chapter:
- What is JMH?
- Creating a JMH benchmark
- Running the benchmark
- Using the IDE plugin
- JMH benchmark parameters
- JMH usage examples
By the end of the chapter, you will be able to not only measure the average execution time of an application and other performance values (such as throughput, for example) but also to do it in a controlled manner—with or without the JVM optimizations, warm-up runs, and...