| Start |
|---|
| Simple JMH example One of the tools for writing proper benchmark tests is JMH (opens new window). Let's say we want to compare performance of searching an element in The easiest way to get JHM into your project - is to use maven and shade (opens new window) plugin. Also you can see After this you need to write benchmark class itself: Please keep in mind this And we're all set. We just need to run
And after some warmup and calculation iterations, we will have our results: About that You can find more information about writing proper benchmarks in Aleksey Shipilëv's blog (opens new window), in Jacob Jenkov's blog (opens new window) and in java-performance blog: 1 (opens new window), 2 (opens new window). |
Read Article
https://develop.horje.com/learn/1434/reference