Skip to content

Commit b4d2413

Browse files
Skip coloring items with <= 0.05 absolute delta
Counts will always exceed this anyway, which is fine -- they're inherently non-noisy -- and for times this is probably noise. It's 50ms, anyway, so ... too small to be worth it on all of our benchmarks? Probably?
1 parent 72b9d01 commit b4d2413

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

site/static/detailed-query.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,19 @@ <h3 id="title"></h3>
7575
}
7676
if (pct && pct != Infinity && pct != -Infinity) {
7777
let classes;
78-
if (delta > 1) {
78+
if (pct > 1) {
7979
classes = "positive";
80-
} else if (delta < 1) {
80+
} else if (pct < 1) {
8181
classes = "negative";
8282
} else {
8383
classes = "neutral";
8484
}
85-
return `<span class="${classes}" title="${delta.toFixed(3)}">${pct.toFixed(1)}%</span>`;
85+
// some arbitrary "small" value
86+
// ignore this because it's not too interesting likely
87+
if (Math.abs(delta) <= 0.05) {
88+
classes = "neutral";
89+
}
90+
return `<span class="${classes}" title="${from.toFixed(3)} - ${to.toFixed(3)}${delta.toFixed(3)}">${pct.toFixed(1)}%</span>`;
8691
} else {
8792
return `<span title="error" style="color: orange;">-</span>`;
8893
}

0 commit comments

Comments
 (0)