Performance
The repository measures local compute, database queries, payloads, and painted browser data. Budgets are decision targets, not claims that current code meets them.
Choose a measurement
| Layer | Command / evidence | Limit |
|---|---|---|
| Local data and CPU | bun test src/lib/perf |
Fixture JSON, local gzip estimate and warmed compute; no network or rendering. |
| Database |
QC_DB_INTEGRATION=1 bun test src/lib/db/perf.integration.test.ts
|
Requires the expected seeded dataset; measures queries, not Clerk or rendering. |
| Browser | bun run test:perf |
Production build, data-ready DOM and transfer measurements; configured profiles and seed state matter. |
| Request breakdown |
Server-Timing headers and optional
QC_SERVER_TIMING=1 page logs
|
Auth/data/serialization timings, not full user-perceived latency. |
Browser readiness
The probe requires a destination-matching data element that is visible and not hidden/inert/busy, then waits for animation frames. A heading, skeleton, or API response alone is insufficient. CDP measures transferred bytes separately from decoded API JSON. Tests also check duplicate GETs and font hints in both HTML and Link headers.
Cold entry uses fresh contexts; navigation measures real in-app actions without document reload. Simulated internet settings model a repeatable lab link, not deployment latency. Remote mode needs a real host and authenticated storage state; it does not use the local test bypass. See the performance runbook for environment flags and artifact locations.
Using results
Source budgets live in src/lib/perf/budgets.ts. Read the HTML/JSON summary
with the exit status: failed and slow samples remain in the report. Compare like-for-like
dataset, build, network profile and browser settings. Do not infer throughput or prove an
alternative architecture slower from a target number.
Change checks
A new list field can increase payload on every page; a new provider subscription can affect every keystroke. Measure the affected path, preserve source/decoded/transfer distinctions, and keep readiness selectors aligned with UI changes. Fixture review keys are UUIDs from fixture helpers or current data, not hand-built FFY URLs.