#!/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;