OOME in simple benchmark
Vladimir Sitnikov
sitnikov.vladimir at gmail.com
Sun Jan 14 18:41:29 UTC 2018
Сергей> .measurementIterations(20)
Suppose you add .measurementTime(TimeValue.seconds(1)) for clarity.
Then measurementIterations(20) would mean JMH would perform 20 loops of
1-second long tests. JMH would perform as many executions of benchmark
method as it can during those 1-second long tests. That is why you are
getting OOM.
If you want to call benchmark method 20 times only, then you need something
like @BenchmarkMode(Mode.SingleShotTime)
Does that make sense?
Vladimir
More information about the jmh-dev
mailing list