Only color benchmark change when delta exceeds 5%

Treat changes within ±5% as noise and show a neutral white circle; only
swings beyond 5% get a green/red indicator. The percent value is still
always shown.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
loks0nandClaude Opus 4.8 committed 2026-06-26 15:46:48 +01:00
1 parent 11397dcba0
commit 101ffff8e2
1 file changed
+5 -3
+5 -3
View File
@@ -109,12 +109,14 @@ function changeCell(before, after, lowerIsBetter) {
}
const percent = Number((((after - before) / before) * 100).toFixed(1));
if (percent === 0) {
return `:white_circle: ${code('0%')}`;
const label = code(`${percent > 0 ? '+' : ''}${trimNumber(percent)}%`);
if (Math.abs(percent) <= 5) {
return `:white_circle: ${label}`;
}
const improved = lowerIsBetter ? percent < 0 : percent > 0;
return `${improved ? ':green_circle:' : ':red_circle:'} ${code(`${percent > 0 ? '+' : ''}${trimNumber(percent)}%`)}`;
return `${improved ? ':green_circle:' : ':red_circle:'} ${label}`;
}
function detailTable(rows) {