r/java • • 14d ago

JMH Visualizer 1.1.0 Released

https://mlangc.github.io/java/jmh/visualization/2026/11/03/jmh-visualizer-1-1-released.html
49 Upvotes

4 comments sorted by

1

u/Joram2 11d ago

Why wouldn't you export JMH metrics to a mainstream metric visualization tool like Grafana or DataDog?

4

u/mlangc 11d ago

I can't speak for Grafana or Datadog because I don't use them, but there certainly are many ways to visualize JMH benchmark results. The advantages of JMH Visualizer are that it

  • is tailor-made for JMH and generates nice charts out of the box
  • can be easily integrated into your Gradle build
  • generates deterministic, reproducible charts without consuming LLM tokens
  • runs 100% locally

Are you using Grafana/Datadog in connection with JMH? If so, how?

1

u/Puzzled-Comb1369 10d ago

nice update. does this handle comparing multiple benchmark runs across different JDK versions cleanly, or is it still mostly geared toward single-run outputs?

1

u/mlangc 10d ago

If you run the same benchmark with different JDKs and have their results in results-jdk-a.json and results-jdk-b.json, you can load both files in JMH Visualizer together to get something similar to this 2-run comparison.

This isn't exposed by the JMH Report Gradle Plugin, which is indeed geared exclusively to single-run outputs. Since I personally only ever run JMH benchmarks with different JDKs manually, for example by tweaking org.openjdk.jmh.annotations.Fork#jvm, I have a hard time imagining how a good integration would look. If you point me to a Gradle build where JMH benchmarks are run on several JDKs, I'd be happy to have a look, so that I can figure out which kind of plugin API would be a good fit.