https://github.com/bkwld/lightkeeper
Averages multiple successive Lighthouse tests to arrive at a more accurate PageSpeed score
https://github.com/bkwld/lightkeeper
Last synced: over 1 year ago
JSON representation
Averages multiple successive Lighthouse tests to arrive at a more accurate PageSpeed score
- Host: GitHub
- URL: https://github.com/bkwld/lightkeeper
- Owner: BKWLD
- License: mit
- Created: 2020-09-25T18:30:48.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-10-26T16:02:40.000Z (over 3 years ago)
- Last Synced: 2025-03-30T11:02:00.539Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 188 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lightkeeper
Averages multiple successive Lighthouse tests to arrive at a more accurate PageSpeed score.

## Usage
```
$ npm install --global @bkwld/lightkeeper
$ lightkeeper https://yourdomain.com
```
The results will be something like this:
```
Mobile Results
┌─────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
│ │ Score │ FCP │ SI │ LCP │ TTI │ TBT │ CLS │
├─────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
│ #1 │ 57 │ 3.8s │ 5s │ 6.2s │ 5.6s │ 328ms │ 0 │
├─────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
│ #2 │ 66 │ 2.5s │ 3.5s │ 5.5s │ 5.2s │ 406ms │ 0.005 │
├─────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
│ #3 │ 70 │ 2.5s │ 3.5s │ 5.4s │ 5s │ 307ms │ 0 │
├─────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
│ AVG │ 64.3 │ 2.9s │ 4s │ 5.7s │ 5.3s │ 347ms │ 0.002 │
├─────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
│ SD │ 5.4 │ 646ms │ 719ms │ 354ms │ 263ms │ 42ms │ 0.002 │
└─────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
```
The summary rows (which can be exclusive returned with the `-s` option) contain the following rows:
- `AVG` - The [statistical mean](https://en.wikipedia.org/wiki/Mean)
- `SD` - The [standard deviation](https://en.wikipedia.org/wiki/Standard_deviation)
#### Options
From `lightkeeper --help`:
```
ARGUMENTS
The URL to test
OPTIONS
-b, --block Comma seperated URLs to block, wildcards allowed
-d, --desktop Test only desktop
-m, --mobile Test only mobile
-s, --summary Only show summary rows
-t, --times The number of tests to run
default: 10
```
For example:
- `lightkeeper https://www.bukwild.com` - Runs 10 desktop and 10 mobile tests
- `lightkeeper https://www.bukwild.com -m -t=30 -b=googletagmanager` - Runs 30 mobile tests while blocking Google Tag Manager
- `lightkeeper https://www.bukwild.com -ms -t=100 && say "All done"` - Runs 100 mobile tests and only show the summary at the end. And says "All done" aloud on a Mac.