mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
* work to get async local storage working. * a * a * everything but queueMicrotask * sdfghj * . * finish * tests * test * ok * done * im so stupid * Upgrade WebKit * refactor * refactor * changes requested * oops * cool * fix runInAsyncScope
22 lines
746 B
TypeScript
22 lines
746 B
TypeScript
// I would have made this a bash script but there isn't an easy way to track
|
|
// time in bash sub-second cross platform.
|
|
import fs from "fs";
|
|
const start = Date.now() + 5;
|
|
const result = Bun.spawnSync(process.argv.slice(2), {
|
|
stdio: ["inherit", "inherit", "inherit"],
|
|
});
|
|
const end = Date.now();
|
|
const diff = (Math.max(Math.round(end - start), 0) / 1000).toFixed(3);
|
|
const success = result.exitCode === 0;
|
|
try {
|
|
const line = `${new Date().toISOString()}, ${success ? "success" : "fail"}, ${diff}\n`;
|
|
if (fs.existsSync(".scripts/make-dev-stats.csv")) {
|
|
fs.appendFileSync(".scripts/make-dev-stats.csv", line);
|
|
} else {
|
|
fs.writeFileSync(".scripts/make-dev-stats.csv", line);
|
|
}
|
|
} catch {
|
|
// Ignore
|
|
}
|
|
process.exit(result.exitCode);
|