e30e75b5d4
Changesets / Create Version PR (push) Has been cancelled
Deploy Shadcn Registry / Deploy Production (push) Has been cancelled
Template Metrics / LOC + Bundle Size (push) Has been cancelled
Code Quality / Oxlint + Oxfmt (push) Has been cancelled
Code Quality / Template Sync (push) Has been cancelled
Code Quality / Build Changed Packages (push) Has been cancelled
Code Quality / Test Changed Packages (push) Has been cancelled
Deploy Expo Example / Deploy Production (push) Has been cancelled
Deploy Ink Example / Deploy Production (push) Has been cancelled
Python Tests / pytest (assistant-stream, 3.10) (push) Has been cancelled
Python Tests / pytest (assistant-stream, 3.12) (push) Has been cancelled
Python Tests / pytest (assistant-ui-sync-server-api, 3.10) (push) Has been cancelled
Python Tests / pytest (assistant-ui-sync-server-api, 3.12) (push) Has been cancelled
24 lines
651 B
TypeScript
24 lines
651 B
TypeScript
import { spawnSync } from "node:child_process";
|
|
import { readdirSync } from "node:fs";
|
|
import { dirname, join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const benchDir = dirname(fileURLToPath(import.meta.url));
|
|
const files = readdirSync(benchDir)
|
|
.filter((f) => /\.bench\.tsx?$/.test(f))
|
|
.sort();
|
|
|
|
if (files.length === 0) {
|
|
console.log("no bench files found");
|
|
process.exit(0);
|
|
}
|
|
|
|
let exitCode = 0;
|
|
for (const f of files) {
|
|
console.log(`\n=== ${f} ===`);
|
|
const r = spawnSync("tsx", [join(benchDir, f)], { stdio: "inherit" });
|
|
if (r.status !== 0 && exitCode === 0) exitCode = r.status ?? 1;
|
|
}
|
|
|
|
process.exit(exitCode);
|