Open source · Performance & Reliability

Network Waterfall Diff

Compare network waterfalls across builds and show changed request costs.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Compare two saved HAR-style JSON exports to see which request costs changed. It reads local evidence only; it does not fetch a URL, drive a browser, replay a request, or infer what a live site would do. This is useful when a build changes request count, total timing, transferred body size, captured cache policy or an explicitly supplied critical dependency.

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

npm run example:pass  # equivalent requests in different order; exit 0
npm run example:fail  # synthetic regressions; exit 1
node bin/network-waterfall-diff.mjs --root exports \
  --before before.har.json --after after.har.json \
  --timing-budget-ms 5 --size-budget-bytes 1024 \
  --report comparison.json
npm run check

Read the result

The two input paths and optional report path are resolved beneath --root (default: the working directory). Each input's real path must remain in the root. --report writes JSON byte-identical to stdout, but only after the output passes the destination guard. The input files are never modified.