Skip to content

Latest commit

 

History

History

jmh-kata

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

What is the JMH Kata?

The JMH Kata is a simple project setup with some basic micro-benchmarks that you can use as a model to try out your own Java micro-benchmarks.

The JMH Kata leverages the Java Micro-benchmark Harness tool from OpenJDK.

There are two micro-benchmarks currently checked in:

  1. IntListJMHBenchmark This test compares the performance of filtering, summing and transforming a million randomly generated integers stored in an ArrayList<Integer>, a FastList<Integer> and an IntArrayList.
  2. PersonJMHBenchmark This test compares the performance of various algorithms applied to a List of class Person which has randomly generated values for age, height and weight. The instances of class Person are stored in a JDK List and an Eclipse Collections MutableList

Both of these benchmarks use throughput in seconds for the values output (operations per second). This means the bigger the numbers, the better the performance. You should be able to execute these benchmarks after compiling the code and running the main() method in each class. You can use these tests as examples to write your own benchmarks.