title: Benchmarking in oracle jdk 8 for performance testing
body: <p>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 </p>
  
  <pre><code>@OutputTimeUnit(TimeUnit.NANOSECONDS)
  @BenchmarkMode(Mode.AverageTime)
  </code></pre>
  
  <p>which it is a part of <a href="http://openjdk.java.net/projects/code-tools/jmh/" rel="nofollow">JMH</a> in openjdk.</p>
  
  <p>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. </p>