You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Cross-iteration peak-attribution sections. Both REOPENED ("regression")
107
+
// and WIN ("win") render the same shape: heading, description, table of
108
+
// metric / current / peak / vs peak / candidates, with drift footnotes when
109
+
// peak and current had different baselines and main moved enough to confound
110
+
// the comparison. Only the framing (status filter, sort direction, copy,
111
+
// delta wording) differs.
112
+
constPEAK_SECTIONS={
113
+
regression: {
114
+
status: 'REOPENED',
115
+
headingPrefix: '📜 Regressions from peak',
116
+
description:
117
+
`These metrics were better on a prior iteration than they are now. The peak's percent-delta vs its baseline dominates current's percent-delta vs its baseline — not attributable to per-sample noise. Bisect candidates are the commits between the peak iteration and HEAD; nearest-to-peak is usually the best bet.`,
118
+
columnHeader: '| metric | current | peak | vs peak | bisect candidates |',
119
+
// Largest % regression first (descending on signed delta).
120
+
sortSign: -1,
121
+
formatDelta: (delta)=>
122
+
delta>0
123
+
? `regressed +${delta.toFixed(0)}%`
124
+
: `${delta.toFixed(0)}%`,
125
+
},
126
+
win: {
127
+
status: 'WIN',
128
+
headingPrefix: '🏆 New peaks',
129
+
description:
130
+
`These metrics reached a new best in this iteration — current's percent-delta vs its baseline dominates the prior peak's percent-delta vs its baseline. Credit candidates are the commits between the prior peak and HEAD; nearest-to-current is usually the cause.`,
131
+
columnHeader: '| metric | current | prior peak | vs prior peak | credit candidates |',
132
+
// Most-improved first. delta_from_peak_pct is negative for WIN, so
`These metrics were better on a prior iteration than they are now. The peak's percent-delta vs its baseline dominates current's percent-delta vs its baseline — not attributable to per-sample noise. Bisect candidates are the commits between the peak iteration and HEAD; nearest-to-peak is usually the best bet.`,
456
-
);
494
+
lines.push(config.description);
457
495
lines.push('');
458
-
lines.push('| metric | current | peak | vs peak | bisect candidates |');
496
+
lines.push(config.columnHeader);
459
497
lines.push('|---|---|---|---|---|');
460
498
461
499
constflagged=[];
@@ -464,18 +502,10 @@ function renderRegressionsFromPeak(lines, report) {
0 commit comments