Using a sandbox environment we will run a user-flow audit chronologically in GitHub Actions.
The results will be compiled and used to generate generate charts.
These will help users understand how much results can vary using a similar setup.
After the completion of the user-flow audit a script will be run to compile and clean up the data.
The script will perform the following actions:
Open the audit report located at ~/measures/*
Extract the fetchTime and performance score
Open the compiled results located in ~/data/sample-1.json
Append the extracted result data to the compiled results
Save the updated compiled results
Delete the audit report located at ~/measures/*
The script will be located at ~/scripts/compile-and-cleanup.js
The compiled report will be stored in a file at ~/data/sample-1.json.
The file will contain an array of the fetchTime and performance score of all the audit runs.
Motivation
Document the variance in performance scores between Lighthouse User Flow runs on GitHub runners.
To improve a users ability to draw conclusions about a performance-impacting change:
Lighthouse has documented that sometimes the performance score is different between audits. They have also identified and documented the main sources of variance and how to mitigate them.
Implementation
Using a sandbox environment we will run a user-flow audit chronologically in GitHub Actions. The results will be compiled and used to generate generate charts. These will help users understand how much results can vary using a similar setup.
Sandbox Environment Setup
Questions & Answers
Github Workflow Configuration
Implementation details:
Data Collection & Compilation
The data will be collected running
npx user-flow
in a GitHub action with the following configuration in the .user-flowrc.json:After the completion of the user-flow audit a script will be run to compile and clean up the data. The script will perform the following actions:
~/measures/*
~/data/sample-1.json
~/measures/*
The script will be located at
~/scripts/compile-and-cleanup.js
The compiled report will be stored in a file at
~/data/sample-1.json
. The file will contain an array of the fetchTime and performance score of all the audit runs.Example compiled results object
The results will be saved in the repo by committing the updated compiled report file as a step CI job.
Results Documentation
TODOS