Introduction to JMH - Java Performance Tuning Guide
Menu 10 May 2014: Original version. Introduction This article will give you an overview of basic rules and abilities of JMH. The second article will give you an overview of JMH profilers . JMH is a new microbenchmarking framework (first released late-2013). Its distinctive advantage over other frameworks is that it is developed by the same guys in Oracle who implement the JIT. In particular I want to mention Aleksey Shipilev and his brilliant blog . JMH is likely to be in sync with the latest Oracle JRE changes, which makes its results very reliable. You can find JMH examples here . JMH has only 2 requirements (everything else are recommendations): You need to create a maven project using a command from the JMH official web page You need to annotate test methods with @Benchmark annotation In some cases, it is not convenient to create a new project just for the performance testing purposes. In this situation you can rather easily add JMH into an existing project.Read full article from Introduction to JMH - Java Performance Tuning Guide
No comments:
Post a Comment