nonius icon indicating copy to clipboard operation
nonius copied to clipboard

Fix bad data on html report summary page

Open jtippet opened this issue 5 years ago • 0 comments

The HTML report's Javascript incorrectly assumes that the benchmarks in each run are sorted in the same order. That's not the case (maybe it should be?). Instead, you can often have something like this:

var data = { runs: [
    { benchmarks: [ { name: 'a', mean: 1 }, { name: 'b', mean: 2 } ] },
    { benchmarks: [ { name: 'b', mean: 3 }, { name: 'a', mean: 4 } ] },
]};

In the above example, the summary plot would assume that the first benchmark is named 'a', and it would draw a line for series 'a' connecting points [1, 3]. It should instead draw a line connecting points [1, 4].

This change updates the javascript to search all the runs in the benchmark for one with the target name.

Fixes #108.

jtippet avatar Feb 25 '20 23:02 jtippet