Compare to baseline
compare_to_baselineMeasures a URL's PageSpeed performance now and compares it against a saved baseline to verify whether a change actually helped, reporting only differences outside the noise range.
Instructions
Use to answer "did that change actually help"; for a one-off measurement with nothing to compare against use analyse_page. Measures now and compares against a saved baseline for the same URL and strategy. THE FIRST CALL ON A URL RECORDS THE BASELINE and compares nothing, which is the correct answer before anything has changed, and a call after the change compares against it. A verdict is only given where the two min-max ranges do NOT overlap: on an unchanged page the performance score has been measured running 27 to 37 and Total Blocking Time 824ms to 3.05s, so comparing medians alone reports improvements that are just the instrument moving. Where a change is real it reports both the difference in medians and the smaller figure the ranges actually guarantee, and the guaranteed one is the figure the measurement supports. Also reports which findings stopped and started failing, and flags a Lighthouse version change, which moves scores without the page moving. Does NOT compare field data, which is a 28-day window and cannot show a change made this week. SLOW, several minutes: it returns a JOB ID and you collect the verdict with get_job_result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runs | No | Distinct analyses each side. Default 3. | |
| urls | No | Absolute http(s) URLs. Defaults to saved URLs. | |
| strategy | No | Part of the baseline identity. Default mobile. | |
| save_baseline | No | Replace the baseline with this measurement. Default false, so repeated calls keep comparing against the same starting point. |