JMH v0.5

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Mar 7 08:39:20 PST 2014


Hi there JMH users,

JMH v0.5 is deployed to Maven Central now (thanks Evgeny!).
 http://central.maven.org/maven2/org/openjdk/jmh/jmh-core/
 http://search.maven.org/#search%7Cga%7C1%7Cjmh

I would like to highlight a few things about this release:

 * JVM languages support is pushed there. Please follow the updated JMH
OpenJDK page to figure out how to use archetypes to generate the
benchmarks for non-Java languages:
  http://openjdk.java.net/projects/code-tools/jmh/

The archetypes index on Maven Central should update in a few days (IIRC,
Sunday morning). If you want JVM language support right now, you may
want to use bleeding edge, as described here:
  http://mail.openjdk.java.net/pipermail/jmh-dev/2014-March/000556.html

...or shamelessly rip off the build configuration from some existing
archetype:

http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-archetypes/jmh-scala-benchmark-archetype/src/main/resources/archetype-resources/pom.xml

 * The important change for Java benchmark users is that we modularized
jmh-core, and so you need an additional dependency for
jmh-generator-annprocess to process your Java benchmarks with JMH 0.5+,
if you want to keep the same behavior (some folks may choose to use
other generators). Java benchmark archetypes already take care of that
for you, but you will need to update the custom POMs you already have in
your projects when upgrading, see:

http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-archetypes/jmh-java-benchmark-archetype/src/main/resources/archetype-resources/pom.xml

 * We fixed a few annoying usability bugs in @Param, and now you don't
have to prefix numeric values with "zeroes" to match the numerical and
lexicographical orders. Runners honor the declaration order of parameter
values now.

 * @Params are not required to be public fields now: this helps for
non-Java languages not exposing the public fields.

 * Internal inlining hints are reworked a bit to prohibit/enforce
inlining of the generated benchmarks more accurately. This should yield
more predictable performance in some cases.

Thanks,
-Aleksey.


More information about the jmh-dev mailing list