You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+63-29Lines changed: 63 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,21 +7,22 @@ Google PageSpeed score command line toolkit
7
7
8
8
Get a score and metrics via the Google PageSpeed Insights API or a local Lighthouse run.
9
9
10
-
-[Recommendations for using the score and metrics values](#recommendations-for-using-the-score-and-metrics-values)
10
+
> For recommendations about using the score check out my blog post: [What's in the Google PageSpeed score?](https://medium.com/expedia-group-tech/whats-in-the-google-pagespeed-score-a5fc93f91e91)
11
+
11
12
-[Requirements](#requirements)
12
13
-[Usage](#usage)
13
-
-[`--strategy` - mobile or desktop](#--strategy---mobile-or-desktop)
-[`LANTERN_DEBUG=true` - save metrics estimation traces](#lantern_debugtrue---save-metrics-estimation-traces)
17
-
18
-
## Recommendations for using the score and metrics values
19
-
20
-
Check out my blog post for more details: [What's in the Google PageSpeed score?](https://medium.com/expedia-group-tech/whats-in-the-google-pagespeed-score-a5fc93f91e91)
14
+
-[multiple runs](#multiple-runs)
15
+
-[mobile or desktop strategy](#mobile-or-desktop-strategy)
16
+
-[save result JSON to disk](#save-result-json-to-disk)
17
+
-[Local mode](#local-mode)
18
+
-[set CPU slowdown multiplier](#set-cpu-slowdown-multiplier)
19
+
-[save trace & devtools log to disk](#save-trace--devtools-log-to-disk)
Switches to running Lighthouse locally instead of calling the PSI API. This can be useful for non-public URLs (e.g. staging environment on a private network) or debugging. To ensure the local results are close to the PSI API results this module:
70
86
71
-
* uses the same version of LightHouse as PSI (5.0.0 as of 26 June 2019)
72
-
* uses the [LightRider mobile config](https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/lr-mobile-config.js)
73
-
* allows throttling of CPU with `--cpu-slowdown` (default 4x). Please note that PSI infrastructure already runs on a slower CPU (that's like a mobile device) hence the need to slow our laptops CPU down for local runs.
74
-
* you can also use the same Chrome version as PSI (76 as of 21 June 2019) by specifying CHROME_PATH
87
+
* uses the same version of LightHouse as PSI (5.6.0 as of 2020-01-27)
88
+
* uses the [LightRider mobile config](https://github.com/GoogleChrome/lighthouse/blob/master/lighthouse-core/config/lr-mobile-config.js) like PSI
89
+
* allows throttling of CPU to better match PSI infrastructure limits
90
+
* you can also use the same Chrome version as PSI (78 as of 2020-01-27) by specifying CHROME_PATH (and ensuring you have the correct version installed)
Local results will still differ from the PSI API because of local hardware and network variability.
82
98
99
+
### set CPU slowdown multiplier
100
+
101
+
`--cpu-slowdown` will allow setting CPU throttling multiplier (default 4x). Only available in [local mode](#local-mode).
102
+
103
+
Please note that PSI infrastructure already runs on a slower CPU (that's like a mobile device) hence the need to slow our machines CPU down for local runs.
104
+
105
+
### save trace & devtools log to disk
106
+
107
+
`--save-assets` will save trace & devtools log to disk. Only available in [local mode](#local-mode).
0 commit comments