I'm using JMH and I find something hard to understand: I have one method annotated with @Benchmark
and I set measurementIterations(3)
. The method is called 3 times, but within each iteration call, the function runs a rather big and random number of times.
My question is: is that number completely random? Is there a way to control it and determine how many times should the function run within an iteration? And what is the importance with set up the measurementIterations
if each way or another, the function will run a random number of times?