mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 16:04:21 +00:00
Failed warmups and repetitions were dropped from benchmark summaries, a failed startup, build or cleanup could leave an earlier success report in place, and a hung renderer or child process could block a run. Every attempt now keeps its status, metrics and error so summaries have the complete denominator; failures replace stale reports; browser and child-process lifecycles are bounded with cleanup of owned resources; and each criterion execution gets its own artifact directory. Co-authored-by: Mr0Bread <55754540+Mr0Bread@users.noreply.github.com>
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
/**
|
||
* Backend performance gate: runs the criterion benches of the crates on the
|
||
* interactive path and checks their means (µs) against `budgets.json` › rust
|
||
* and the local baseline.
|
||
*
|
||
* pnpm perf:rust run benches, then check
|
||
* pnpm perf:rust -- --no-run inspect recorded results (no execution)
|
||
* pnpm perf:rust -- --package ide-text --save-baseline
|
||
*/
|
||
import { resolve } from "node:path";
|
||
import { parseArgs } from "node:util";
|
||
import { runRust } from "./lib/rustRun.ts";
|
||
|
||
const ROOT = resolve(import.meta.dirname, "..");
|
||
|
||
const { values: args } = parseArgs({
|
||
options: {
|
||
package: { type: "string", multiple: true },
|
||
"no-run": { type: "boolean", default: false },
|
||
"save-baseline": { type: "boolean", default: false },
|
||
"fail-on-regression": { type: "boolean", default: false },
|
||
},
|
||
});
|
||
|
||
process.exitCode = await runRust({
|
||
root: ROOT,
|
||
packages: args.package,
|
||
noRun: args["no-run"],
|
||
saveBaseline: args["save-baseline"],
|
||
failOnRegression: args["fail-on-regression"],
|
||
});
|