Skip to content

Commit 137cb13

Browse files
authored
chore(cli-repl): track executable size as performance metric (#2569)
1 parent cb6b160 commit 137cb13

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

packages/cli-repl/src/smoke-tests.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export async function runSmokeTests({
8282
});
8383
}
8484
const perfResults: PerfTestResult[] = [];
85+
const commonPerfTags = [process.arch, process.platform];
8586

8687
for (const {
8788
name,
@@ -365,7 +366,7 @@ export async function runSmokeTests({
365366
perfResults.push({
366367
info: {
367368
test_name: name,
368-
tags: [...(tags ?? []), process.arch, process.platform],
369+
tags: [...(tags ?? []), ...commonPerfTags],
369370
},
370371
created_at,
371372
completed_at,
@@ -378,6 +379,22 @@ export async function runSmokeTests({
378379
}
379380
}
380381
if (wantPerformanceTesting) {
382+
perfResults.push({
383+
info: {
384+
test_name: 'executable_size',
385+
tags: [...commonPerfTags],
386+
},
387+
created_at: new Date().toISOString(),
388+
completed_at: new Date().toISOString(),
389+
artifacts: [],
390+
metrics: [
391+
{
392+
name: 'size_bytes_mean',
393+
type: 'MEAN',
394+
value: (await fs.stat(process.execPath)).size,
395+
},
396+
],
397+
});
381398
console.log(JSON.stringify(perfResults));
382399
} else {
383400
console.log('all tests passed');

0 commit comments

Comments
 (0)