Open source · Performance & Reliability

Browser Memory Budget

Track browser memory budgets across routes, states and viewport profiles.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

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+; inspect the source before using it on your own files.

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 check

Read 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.

Where this check stops

This local walkthrough does not establish the state of a live production system or replace the limits documented in the repository.

Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.

Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.