How can I run JMH benchmarking operations for Average runtime metrics?

Viewed 31

I am trying to measure average runtime performance for particular methods. I want to run them 100 million times. With default options this is taking an eternity. What options I can enable or disable to achieve a faster execution time for the benchmark testing as a whole? I do not need warm up and other fine tuning. All I need is average time for 100 million operations.

1 Answers

We can set

@Measurement(iterations = 100000000)
public void function() {
    // ...
}

to have the JMH execute your operation 100 million times.

Related