Misleading output for differing values of warmup JVM forks and benchmark JVM forks

Daniel Mitterdorfer daniel.mitterdorfer at gmail.com
Wed Feb 19 11:41:06 PST 2014


Hi,

first of all thanks for JMH. It's a really great tool!

I've just stumpled upon a minor problem regarding the command line output
in jmh 0.4. Consider a benchmark annotated with @Fork(value = 3, warmups =
5). JMH will then output:

# Warmup Fork: 1 of 3
# Warmup Fork: 2 of 3
# Warmup Fork: 3 of 3
# Warmup Fork: 4 of 3
# Warmup Fork: 5 of 3

which puzzled me a bit at first. :-)

It boils down to org.openjdk.jmh.runner.Runner#runSeparate(..):

out.println("# Warmup Fork: " + (i + 1) + " of " + forkCount);

which should be

out.println("# Warmup Fork: " + (i + 1) + " of " + warmupForkCount);

I've also put a minimalstic example on as Gist on Github:
https://gist.github.com/danielmitterdorfer/9099932

Daniel


More information about the jmh-dev mailing list