Skip to content

Commit

Permalink
Show simple dash on self comparison on the report
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz committed Oct 30, 2020
1 parent 281cb11 commit defa7a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions perf/benchmark.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ async function run() {
Name: configurations[currentConfigIndex][0],
...Object.fromEntries(
configurations.map((config, configIndex) => {
if (configIndex === currentConfigIndex) {
return [config[0], '-'];
}
const otherBenchMean = benchmarkStatsFor(configIndex, testIndex);
const ratio = (100.0 * otherBenchMean) / currentBenchMean - 100.0;
return [config[0], `${ratio >= 0 ? '+' : ''}${ratio.toFixed(2)} %`];
Expand Down

0 comments on commit defa7a2

Please sign in to comment.