Skip to content

Commit 6c36614

Browse files
authored
chore: update metrics PR comment diff/percentage base (#6849)
1 parent 9ed9c23 commit 6c36614

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/replay/metrics/src/results/pr-comment.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export class PrCommentBuilder {
8484
<td align="right"><strong>${values.diff(0, 1)}</strong></td>
8585
<td align="right"><strong>${values.percent(0, 1)}</strong></td>
8686
<td align="right">${values.value(2)}</td>
87-
<td align="right"><strong>${values.diff(1, 2)}</strong></td>
88-
<td align="right"><strong>${values.percent(1, 2)}</strong></td>
87+
<td align="right"><strong>${values.diff(0, 2)}</strong></td>
88+
<td align="right"><strong>${values.percent(0, 2)}</strong></td>
8989
`;
9090
}
9191

@@ -141,7 +141,7 @@ export class PrCommentBuilder {
141141
this._buffer += `<tr><th>${resultFile.hash}</th>`;
142142
for (const item of analysis.items) {
143143
// TODO maybe find a better way of showing this. After the change to multiple scenarios, this shows diff between "With Sentry" and "With Sentry + Replay"
144-
this._buffer += `<td align="right">${item.values.diff(1, 2)}</td>`;
144+
this._buffer += `<td align="right">${item.values.diff(0, 2)}</td>`;
145145
}
146146
this._buffer += '</tr>';
147147
}

packages/replay/metrics/src/util/console.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ export function printAnalysis(analysis: Analysis): void {
2828
table[AnalyzerItemMetric[item.metric]] = {
2929
value: item.values.value(0),
3030
withSentry: item.values.diff(0, 1),
31-
withReplay: item.values.diff(1, 2),
31+
withReplay: item.values.diff(0, 2),
3232
...((item.others == undefined) ? {} : {
3333
previous: item.others.value(0),
3434
previousWithSentry: item.others.diff(0, 1),
35-
previousWithReplay: item.others.diff(1, 2)
35+
previousWithReplay: item.others.diff(0, 2)
3636
})
3737
};
3838
}

0 commit comments

Comments
 (0)