Skip to content

Page speed ​

Every replay measures how fast each page loaded and tells you which page was slow and why. Pages are rated Good, Needs improvement or Poor, and listed worst first.

Lab measurements

The numbers come from one browser on one machine and network, so they vary from run to run. Use --repeat to take the median of several runs. They show where to look, not how every visitor experiences the site.

See the results ​

Run a replay as usual:

bash
node bin/replay.js steptrails-recording.json --html report.html
  • Terminal: a PAGE SPEED list after the steps, worst page first, with the reason under each page.
  • HTML report: a Page speed table with the rating, first byte, main content, load time, layout shift, request count and what stood out.
  • JUnit report: a note for every page that is not Good (it does not fail the tests).
  • Jira bug: pages rated Poor are listed.
  • --json: the full details under performance.

Options ​

OptionWhat it does
--fail-on-slowExit with an error if any page is rated Poor, to stop a build on a slow page
--repeat 3Replay 3 times (1 to 10) and use the median of each number. Every run performs your steps, so use it only on flows that are safe to repeat
--no-perfDo not measure speed

What is measured and how it is rated ​

MeasureWhat it meansGoodNeeds improvementPoor
First byte (Time to First Byte)How long the server took to start answeringup to 0.8 sup to 1.8 sover 1.8 s
Main content (Largest Contentful Paint)When the biggest thing on screen appearedup to 2.5 sup to 4 sover 4 s
Layout shift (Cumulative Layout Shift)How much the page jumped around while loadingup to 0.1up to 0.25over 0.25
LoadedWhen the page finished loadingup to 3 sup to 6 sover 6 s

The first three use the published Web Vitals thresholds. Page load has no official threshold, so StepTrails uses 3 and 6 seconds. A page takes the worst rating of its measures.

Also reported for each page: number of requests, total download size, the slowest and the biggest file, requests that failed (HTTP 400 and above, or a network failure) and errors in the browser console.

What stood out ​

Next to each page the report explains in words, for example:

  • The server was slow to respond: the first byte took 2.4 s.
  • The main content appeared late (4.1 s). Slowest resource: /api/search (1.8 s).
  • The page downloads 5.0 MB; the biggest file is /hero.png (4.0 MB).
  • 1 request failed (for example /missing.png: 404).
  • 2 browser console errors.

Limits ​

  • It measures the pages your recording visits, as a replay performs them, not how real visitors experience the site.
  • Download size only counts files the browser reports a size for; some files from other sites report none.
  • Throttling the network or CPU is not built yet.