Skip to content

Commit b64b1f0

Browse files
committed
small ref
1 parent c1dfc7b commit b64b1f0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

dev-packages/node-overhead-gh-action/lib/getOverheadMeasurements.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ async function getMeasurements(instrumentFile) {
2323
log('Example app listening, running autocannon...');
2424

2525
try {
26-
return await startAutocannonProcess();
26+
const result = await startAutocannonProcess();
27+
await killAppProcess();
28+
return result;
2729
} catch (error) {
2830
log(`Error running autocannon: ${error}`);
29-
} finally {
30-
log('Killing app process...');
3131
await killAppProcess();
32-
log('App process killed');
32+
throw error;
3333
}
3434
}
3535

@@ -69,8 +69,10 @@ async function startAppProcess(cmd) {
6969
});
7070

7171
return async () => {
72+
log('Killing app process...');
7273
appProcess.kill('SIGKILL');
7374
await appClosePromise;
75+
log('App process killed');
7476
};
7577
}
7678

0 commit comments

Comments
 (0)