I'm using JMH benchmark in my project. I have method 1 and method 2 annotated with @Benchmark. I want the order to be: method1, method2, mehod1, method2... and so on... Which means: I wand that method 2 will immediately follow method 1. Is there a way to do so?
Thank you!
The order in which JMH executes @Benchmark
methods is usually irrelevant: the runs are isolated from each other, and so results are independent. But in case you still want the particular order, then @Benchmark
-s are executed in the lexicographical order, hence, rename your methods in that order.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With