Modes

The output of our benchmark results, from the previous section, included a Mode column that had the value of thrpt which is short for throughput. This is the default mode and there are an additional four modes. All JMH benchmark modes are listed and described as follows:

Mode Description
All Measures all other modes inclusively.
Average This mode measures the average time for a single benchmark to run.
Sample Time This mode measures the benchmark execution time and includes min and max times.
Single Shot Time With this mode, there is no JVM warm up and the test is to determine how long a single benchmark method takes to run.
Throughput This is the default mode and measures the number of operations per second the benchmark ...

Get Java 9: Building Robust Modular Applications 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.