JMH configuration and result interpretation

J Kinable j.kinable at gmail.com
Sun Apr 10 15:41:54 UTC 2016


Dear,

I recently encountered JMH and I wanted to give it a try. I've a few
specific questions about how to configure JMH and how to interpret the
result.

1. Through the parameter 'measurementIterations' I can specify how often a
benchmark is repeated. But what is the function of the parameter
'measurementTime'? Let's say I specify measurementTime=1 second and I
create an @benchmark function which normally takes 10 minutes to complete.
Is this function interrupted/killed after 1 second? The javadoc description
of measurementTime  "Time of each measurement iteration" isn't very
descriptive".


2. Let's assume I run a benchmark with "AverageTime" mode. For each
benchmark I get a score expressed in ms/op. How should I interpret this?
What is "op" in this case? I would have expected: "average time to finish
the benchmark completely".

thanks,

Joris Kinable


More information about the jmh-dev mailing list