Файли
openidea/perf/rust.ts
T
Mr0Bread 34cb4ad5e0 fix(bench): preserve failed trials and bound cleanup (#4489)
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 <[email protected]>
2026-11-19 19:38:34 +08:00

32 рядки
1.0 KiB
TypeScript
Неформатований Анотація Історія

Цей файл містить неоднозначні символи Юнікоду
Цей файл містить символи Юнікоду, які можна сплутати з іншими символами. Якщо ви вважаєте, що це зроблено навмисно, можете сміливо ігнорувати це попередження. Щоб показати їх, скористайтеся кнопкою Escape.
/**
* 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"],
});