Services

Performance Smoke Checks


Local performance smoke checks

Use the route performance smoke check against already-running local dev/preview servers or a configured base URL. It is intentionally lightweight: Playwright opens each representative route, reads browser navigation/resource timing, and compares the result to simple budgets. It does not run Lighthouse and does not require a production deployment.

bash
1
mise exec -- node tools/scripts/performance-smoke.mjs --list
2
mise exec -- node tools/scripts/performance-smoke.mjs

The default config is tools/performance-smoke-routes.json. It covers representative routes for:

  • www at http://localhost:3040
  • docs at http://localhost:3041
  • blog at http://localhost:3063

Run a single target or override its base URL:

bash
1
mise exec -- node tools/scripts/performance-smoke.mjs --target www
2
mise exec -- node tools/scripts/performance-smoke.mjs --target www --base-url http://127.0.0.1:3040

Useful options:

bash
1
mise exec -- node tools/scripts/performance-smoke.mjs --help
2
mise exec -- node tools/scripts/performance-smoke.mjs --dry-run
3
mise exec -- node tools/scripts/performance-smoke.mjs --timeout 30000

The root package also exposes:

bash
1
pnpm perf:smoke
2
pnpm perf:check

perf:check runs the Cloudflare artifact budget gate first, then the local route smoke check. Use it when both artifact budgets and representative route timing/resource budgets are in scope.

Budget metrics currently supported in route config:

  • navigationMs
  • resourceCount
  • scriptCount
  • transferKiB
  • encodedKiB

If a budget fails, the command exits non-zero and prints the route, metric, measured value, and limit. Treat config changes as intentional budget changes.