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 ...

Get Learn Java 17 Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.