- SBT JMH: GitHub - ktoso/sbt-jmh: "Trust no one, bench everything." - sbt plugin for JMH (Java Microbenchmark Harness)
- Reference: http://tutorials.jenkov.com/java-performance/jmh.html
- Why do we use JMH tool to benchmark but not System.currentTimeMillis() ?
Because JVM will do code optimization (removing dead code, etc) when it runs the code, and it doesn't take into account warm-up and all other things. So we should use the tool to simulate a real production environment with warm-ups and etc.