Skip to content

Generating more reliable lighthouse performance reports by running 'em multiple times and averaging the reports.

Notifications You must be signed in to change notification settings

loggi/lighthouse-average-performance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Lighthouse Average Performance

Lighthouse is an amazing tool to audit your app for performance, accessibility, progressive web apps, SEO and more. Overral, it works pretty well, but when it comes to assessing the performance of an app, there is an inherent variability factor we should expect.

On its Lighthouse Metric Variability and Accuracy, the Lighthouse team describes this problem in more depth, explaining the sources, the impact and how can it be mitigated.

This repository intends to mitigate the variability factor by consecutively running the lighthouse performance audit n-times and averaging the results on the created reports.

How to use it

The project consists of two Node JS scripts (generate-reports.js and parse-reports.js). To use them, you need Node 10+. The generate-reports will run the lighthouse script n-times and put the reports on a directory. The parse-reports will read the reports generated by the former script on a certain directory and generate the average performance metrics.

At the top of each script, there are variables you should customize to use them. To run the scripts, you can do:

chmod +x generate-reports.js # give the file permission to be executed
chmod +x parse-reports.js

APP_URL="my-custom-url" ./generate-reports.js
APP_URL="my-custom-url" ./parse-reports.js

Useful Links

About

Generating more reliable lighthouse performance reports by running 'em multiple times and averaging the reports.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published