Skip to content

Commit 73cdff2

Browse files
authored
Remove baseline tests (e.g. “Call JavaScript function directly”) from comparison (swiftwasm#211)
* Remove baseline tests (e.g. “Call JavaScript function directly”) from comparison * )
1 parent 449c041 commit 73cdff2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ci/perf-tester/src/utils.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ exports.diffTable = (
168168
) => {
169169
let changedRows = [];
170170
let unChangedRows = [];
171+
let baselineRows = [];
171172

172173
let totalTime = 0;
173174
let totalDelta = 0;
@@ -187,7 +188,9 @@ exports.diffTable = (
187188
getDeltaText(delta, difference),
188189
iconForDifference(difference),
189190
];
190-
if (isUnchanged && collapseUnchanged) {
191+
if (name.includes('directly')) {
192+
baselineRows.push(columns);
193+
} else if (isUnchanged && collapseUnchanged) {
191194
unChangedRows.push(columns);
192195
} else {
193196
changedRows.push(columns);
@@ -200,6 +203,11 @@ exports.diffTable = (
200203
const outUnchanged = markdownTable(unChangedRows);
201204
out += `\n\n<details><summary><strong>View Unchanged</strong></summary>\n\n${outUnchanged}\n\n</details>\n\n`;
202205
}
206+
207+
if (baselineRows.length !== 0) {
208+
const outBaseline = markdownTable(baselineRows.map(line => line.slice(0, 2)));
209+
out += `\n\n<details><summary><strong>View Baselines</strong></summary>\n\n${outBaseline}\n\n</details>\n\n`;
210+
}
203211

204212
if (showTotal) {
205213
const totalDifference = ((totalDelta / totalTime) * 100) | 0;

0 commit comments

Comments
 (0)