Usually when I want to test performance I am using System.nanoTime() function before running code and after it and then I am doing a a subtraction. Recently I noticed that people are using
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@BenchmarkMode(Mode.AverageTime)
which it is a part of JMH in openjdk.
We are using Oracle jdk. I wonder if there is a similar tool or if there is another way for building, running, and analysing nano/micro/milli/macro benchmarks instead of writing System.nanoTime.