jzillmann/gradle-jmh-report

Add params as label qualifier

Closed this issue · 11 comments

Thanks for this plugin! I was using jmh-charts, which had this same problem.

In benchmarks that use @Param the labels should qualify what is being tested. Otherwise the chart is not clear. See for example ComputeBenchmark which produces the chart below.

image

In jmh-charts that would look something like,
image

Thanks @ben-manes. Supporting params is on my near term list!

@ben-manes I didn't fix it in the gradle plugin yet, but in the online visualizer: http://jmh.morethan.io
Looks like this:

computebenchmark

The plan to make use of that visualizer in the next version of the gradle plugin. So any feedback on it will flow into the gradle plugin as well!

That looks very nice, thanks!

Perhaps the param value(s) should be bold and the bars given a different color? Alternatively, it might look nicer if showing the param name was optional and just the value(s) was the item's label. Then group by method with the name on the outer bracket, e.g. a nested y-label.

The thrpt ops/s could be the x-label and the chart title the benchmark name. Also the x values could be shortened with a magnitude label, e.g. 35M, 70M, ...

I think those changes would declutter the chart and make items standout more.

Does that match your expectation ?
computebenchmarkv2

That's great. Can add a label and use short numerical values on the x axis?

For the x-axis tick shortening i created a separate issue: jzillmann/jmh-visualizer#2

What you mean by

add a label

?

The benchmark type, e.g. throughput

Ok, i pushed a new version online (http://jmh.morethan.io).
Your caffeine suite now looks much better i think since it was using params heavily....

Not sure if you can decipher that, but FYI, this is how i'm handling the params:

  1. no param => standard
  2. one param, single method => convert to (0)
  3. one param, multi methods => Bar per param Value
  4. two params, single methods => convert to (2)
  5. two+ params, multi methods => combine params & convert to (2)
  6. three+ params, single methods => combine params & convert to (0)

If you have any more requests one the online tool, please use https://github.com/jzillmann/jmh-visualizer/issues.

Once i brought the online version into the gradle plugin, i will close this issue...

Thanks!

This is now released as 0.2.0!

Thanks!