#!/usr/bin/env node /** * Orca startup-time benchmark. * * Launches the built app (out/) against a synthetic userData fixture that * mimics a long-lived real profile (tens of thousands of Chromium cache * files — the documented pathological case for the win32 startup ACL grant), * parses `ORCA_STARTUP_DIAGNOSTICS=1` milestone lines from stderr, and * reports per-phase timings across iterations. * * Usage: * node tools/benchmarks/startup-time-bench.mjs --label baseline * [--iterations 5] [--files 28000] [--fixture-dir ] * [--exe ] [--timeout-ms 240000] * * Prereq (when not using --exe): `pnpm build:electron-vite` so out/ exists. * Results: tools/benchmarks/results/startup-