perf: enforce journey budgets and reference traces

This commit is contained in:
2026-09-02 07:48:02 +03:00
parent 8089d061ec
commit f4cf9fc77e
25 changed files with 1432 additions and 23 deletions

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env node
import { readFile } from 'node:fs/promises';
import { aggregateFiveDriveTraces } from './lib/performance-aggregation.mjs';
const paths = process.argv.slice(2);
if (paths.length !== 5) throw new Error('Pass exactly five explicit drive-trace.v1 JSON paths.');
const runs = [];
for (const path of paths) runs.push(JSON.parse(await readFile(path, 'utf8')));
const aggregate = aggregateFiveDriveTraces(runs);
process.stdout.write(`${JSON.stringify(aggregate, null, 2)}\n`);
if (!aggregate.passes) process.exitCode = 1;