MCPcopy Create free account
hub / github.com/modem-dev/hunk / main

Function main

scripts/run-release-benchmark.ts:75–96  ·  view source on GitHub ↗
(args = Bun.argv.slice(2))

Source from the content-addressed store, hash-verified

73
74/** Run the default benchmark suite and write the versioned release snapshot. */
75export async function main(args = Bun.argv.slice(2)) {
76 const options = await parseRunReleaseBenchmarkArgs(args);
77 mkdirSync(path.dirname(options.out), { recursive: true });
78
79 const proc = Bun.spawn(
80 ["bun", "run", "benchmarks/run.ts", "--samples", String(options.samples), "--out", options.out],
81 {
82 cwd: repoRoot,
83 stdin: "inherit",
84 stdout: "inherit",
85 stderr: "inherit",
86 env: { ...process.env, CI: process.env.CI ?? "1" },
87 },
88 );
89 const exitCode = await proc.exited;
90 if (exitCode !== 0) {
91 throw new Error(`Release benchmark run failed with exit code ${exitCode}`);
92 }
93
94 console.log(`Wrote release benchmark ${options.out}`);
95 console.log("Commit this file with the release prep change before pushing the release tag.");
96}
97
98if (import.meta.main) {
99 await main();

Callers 1

Calls 1

Tested by

no test coverage detected