An offline checker for memory measurements already exported from local browser scenarios. It compares repeated samples with a scenario's byte and growth budgets, preserving the difference between a measurement of zero and an API that was unavailable. A missing measurement must not turn green.
This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.
Run the checked-in example
node bin/browser-memory-budget.mjs --root examples --input pass.json
node bin/browser-memory-budget.mjs --root examples --input growing.json
node bin/browser-memory-budget.mjs --root examples --input unsupported.json
npm run checkRead the result
The three examples exit 0, 1 and 2 respectively. Stdout is one JSON report. By default stderr has a fixed human summary; --json suppresses that summary. --help alone prints usage. --report FILE also writes exactly the stdout bytes to a separate path within --root. The report destination may already be a regular file, but cannot be a symlink, a hard link to an input, a named input, or a path through a parent symlink that leaves the root. Even a dangling input symlink to a not-yet-created report is refused. A refused or failed write emits an incomplete JSON report on stdout and exits 2.