How a speed regression is detected
A fixed threshold — alert if LCP goes above two and a half seconds — is the obvious approach and it is wrong for a specific reason: your pages are not equally variable, and a threshold tuned to the steadiest one will fire constantly on the noisiest.
Key takeaways
- Compare against the page’s own rolling baseline, not a global threshold.
- The trigger is a median outside the baseline’s spread, sustained for two runs.
- The baseline rolls, so a deliberate improvement becomes the new normal automatically.
- A rolling baseline cannot see slow drift, so a separate quarterly comparison does.
- A page that has never been measured has no baseline and reports nothing for three weeks.
The page’s own spread
- Database
- App integration
- Machine learning
- Management
- Analytics
Why a multiple of the spread
A page whose median has sat between 1.8 and 2.2 seconds for three weeks has a spread of about 0.2 seconds, and 2.9 seconds is a long way outside it. A page that has ranged between 3.1 and 5.4 seconds — because it embeds a map, say — has a spread of over two seconds, and 5.6 is unremarkable.
One fixed threshold cannot serve both. A multiple of each page’s own spread serves both with a single setting, and it self-adjusts: a page that becomes more variable automatically becomes harder to alarm on, which is correct.
Why the baseline rolls
A rolling baseline of the last twenty-one runs means a deliberate improvement becomes the new normal within three weeks with nobody doing anything. Somebody optimises the pricing page from 2.0 to 1.3 seconds, and from then on the system is watching for regressions from 1.3.
A fixed baseline would keep congratulating you on being under a target set a year ago, and would miss a regression from 1.3 back to 1.9 entirely, because 1.9 is still under the target.
The drift a rolling baseline cannot see
- Machine learning
- Management
- Analytics
Forty milliseconds a month is invisible to any comparison against the last three weeks, and it is exactly how sites get slow. It is not one bad deploy; it is eleven small ones, each of which was individually reasonable.
So there is a second, much simpler comparison that runs once a quarter: this quarter’s median against last quarter’s, per page, with no cleverness at all. A page that is twenty per cent slower than three months ago appears there whether or not any single day ever triggered anything.
New pages
A page added to the list has no baseline and reports nothing for three weeks, which is worth saying explicitly in the report so its absence is not mistaken for good news. During those three weeks it is measured normally; it simply has nothing to be compared against yet.
Next: budgets, which are the one place a fixed threshold does belong.
All posts