Production measurement
What you need to know
A useful performance comparison holds the environment constant and records repeated observations of a production build. One fast local refresh is not a reliable benchmark.
By the end, you can: define controlled sample and cache state; record uncertainty.
Start an approved production fixture
npm run buildnpm run start -- --hostname 127.0.0.1 --port 3000Expected behavior: With reviewed dependencies and working scripts, a successful build permits a local production server. Stop it after the exercise; these commands have not been run here.
How it works
Choose one scenario, such as a first visit to /catalog followed by an open-details interaction. Record exact application commit and dependency versions, browser build, operating system, device or emulation, network profile, viewport, server placement and measurement tool. Define cold browser state and warm browser state separately from server and CDN cache state. Reset only lab-owned caches. Compare the same action before and after a single change; use a fixed sample count and retain raw results. Report a percentile method, counts and missing measurements. Nearest-rank p75 chooses the value at position ceil(0.75 × n) in ascending order, counting from one. Percentile estimates from small samples are unstable; combine raw observations for a comparable cohort rather than averaging percentiles. Use a production build to avoid mistaking development tooling overhead for application behavior.
Compute a teaching percentile
function p75(samples: number[]): number | null { if (!samples.length || samples.some(n => !Number.isFinite(n) || n < 0)) return null; const sorted = [...samples].sort((a,b)=>a-b); return sorted[Math.ceil(sorted.length * 0.75)-1];}console.log(p75([3000,1000,2000,4000]));Expected behavior: 3000 ms. The input array is unchanged; the dataset is synthetic.
Common mistake
Do not combine different devices or warm and cold observations without recording the mix. A single run and an average of cohort p75 values can conceal slow experiences.
Practice and verification
Use the fixture measurement-plan.json. Run a fixed number of comparable observations only after dependency review; keep each raw value and error separately. Explain why a small local p75 is not CrUX evidence.
Scope: Proposed Next.js 16.x / React 19, App Router with Cache Components disabled unless noted. Framework and browser examples are staged, not executed. Synthetic numbers are not measured performance or actual provider rates.
Further reading: Production · Vitals