jzillmann / gradle-jmh-report

A Gradle plugin building a visual report for JMH benchmarks
Apache License 2.0
46 stars 3 forks source link

For benchmark mode 'all' only one is displayed #7

Closed tinca closed 6 years ago

tinca commented 6 years ago

Hi Johannes, As a newbie I am trying the tools around jmh including your visualization ones. When benchmark mode 'all' is set in gradle-jmh-plugin the json file contains all the modes, but visalization shows only the first one, namely 'thrpt'. I'd expect the grey "buttons" can select another one, but nothing changes. This happens on Mac with Safari and Chrome.

Do I miss something? Thanks Zsolt

jzillmann commented 6 years ago

Hey @tinca , that sounds like a bug to me. If you look at http://jmh.morethan.io/#singleRunExample e.g. the ListCreationBenchmark has more then one metric. You have 2 ways to explore the secondary metrics:

I suspect (1) is not working for you. There are 2 things you could do:

HTH Johannes

tinca commented 6 years ago

Hi Johannes,

Your example looks fine, that's what I would expect here :-) As you suspected (1) is not working. As to (2) I cant see "ListCreationBenchmark". If any of the "RendererBenchamark" (the real name of my BM) is clicked details of the only BM ("thrpt") appear. The only error I can see is: "Not allowed to load local resource: file:///favicon.ico". I guess this should not be a problem. Attached please see an example json which was created using of gradle-jmh plugin 0.4.5-beta-2. (Though 0.4.4 works the same). I had to change the extension to txt to be able to upload.

results-10-20-2017_13-36.txt

Thanks for looking into this! Zsolt

jzillmann commented 6 years ago

Ah, thanks, i see now what the problem is... The 'Score' selection box is for switching between primary and secondary metric (you have secondary metrics if you turn on profilers).

In your case you have the same benchmark name but with multiple modes (thrpt, avgt, ...). It will take me a while fixing this in https://github.com/jzillmann/jmh-visualizer

Meanwhile the only thing you could do is to rename the benchmark names in the json... Like

tinca commented 6 years ago

FYI, renaming to unique benchmark names did not help, only the first is shown. As soon as the first is deleted the next comes to its place. Nevertheless it is not urgent, I can wait for your changes and once again thanks for your investigation and fix. Zsolt

jzillmann commented 6 years ago

Hey @tinca ,

should be fixed with the 0.7 release! Also you can give the online version a try: http://jmh.morethan.io

But mixing benchmark modes like thrpt and avg in one class is not recommended (for this report plugin), since comparing the times of those in a chart don't make so much sense.

tinca commented 6 years ago

Hi Johannes,

Thank for the fix and the advice. Very much appreciated!