We run Lighthouse 5 times on a set of URLs and compare the median runs to each other. Lighthouse 6.0 is used to collect artifacts, and those artifacts are re-used with 5.6.0, so there is no page variance. Only scoring changes are captured.
- Run Lighthouse on GCP (it takes too long locally and my machine will fall asleep without my attention) [1]
- Copy results to
timings-data/urls-6.0
- Copy the same results to
timings-data/urls-5.6.0
, but delete all the LHR json files. [2] - Run the "collect" command for the 5.6.0 dataset. The artifacts are present, but since we deleted the LHRs it will re-run the auditting step of Lighthouse (fast) [3]
- run the comparison command
[1]
# Run Lighthouse on GCP
# I tweaked an existing script we have to do a bulk run: https://github.com/GoogleChrome/lighthouse/blob/collect-gcp/lighthouse-core/scripts/lantern/collect/gcp-create-and-run.sh
git checkout collect-gcp # branched off dc5bb65
sh lighthouse-core/scripts/lantern/collect/gcp-create-and-run.sh
[2]
mkdir timings-data; cd timings-data
unzip ~/lh-6-data.zip # See Resources to download the same data
cp -r urls-6.0 urls-5.6.0
find urls-5.6.0 -name '*lhr*' -delete
cd .. # return to LH root
[3]
git checkout v5.6.0
git checkout origin/collect-gcp -- lighthouse-core/scripts/compare-runs.js lighthouse-core/scripts/lantern/collect/common.js lighthouse-core/scripts/lantern/collect/urls.js
yarn
urls=(`node -e 'console.log(require("./lighthouse-core/scripts/lantern/collect/urls.js").join("\n"))'`)
# Go comment out `throw new Error('Cannot change settings between gathering and auditing');` in runner.js
# Go comment out `lhr.i18n.icuMessagePaths =` in runner.js
node --max-old-space-size=4096 lighthouse-core/scripts/compare-runs.js \
--name urls-5.6.0 \
--collect \
-n 5 \
--lh-flags='--only-categories=performance' \
--urls "${urls[@]}"
[4]
# Compare data.
node lighthouse-core/scripts/compare-runs.js \
--name urls-5.6.0 \
--name urls-6.0 \
--compare \
--filter='performance$' \
--report-exclude 'key|min|max|stdev|cv|^n$' \
--delta-property-sort mean
Data (must request access but will be given freely)
Scatterplot: