A project to help measure the performance of your sites.
This tool gets its performance data from Lighthouse via Puppeteer.
This project is not published as an npm module. To install it, follow these instructions:
- Clone or download the code
- Run
npm install
to install dependencies - Run
npm link
to makequickperf
globally available
Issues running the project? See Troubleshooting below.
$ quickperf [siteurls] [options]
$ quickperf https://www.cwtest086.site/ --output results_2019-06-01 --compare-to results_2019-05-30
$ quickperf -s sites.json -o 2019-07-16 -c 2019-07-12
The tool will output the results of the performance report to the command line. It'll go through three pages (home, inventory and details) for every one of our demo sites. You can optionally save the performance report locally to compare against later.
In your terminal, you'll see a short snapshot of the performance data collected from Lighthouse. If you compare that data to previously-saved reports, you'll see the historical data as well.
Sample output:
$ quickperf https://www.cwtest086.site/
√ https://www.cwtest086.site/
:| Performance: 63
:| First Contentful Paint: 2.7 s
:| First Meaningful Paint: 3.2 s
:| Speed Index: 5.2 s
:( Estimated Input Latency: 150 ms
:) Server response times are low (TTFB): Root document took 160 ms
:( First CPU Idle: 7.4 s
--------------------------------------------------------------------------------
Time to check cwtest086_site_: 59411.4165ms
A space-separated list of URLs to measure.
A JSON file that defines which URLs to measure. The file should be in the following format:
{
"sites": [
{
"name": "cwtest086",
"urls": [
"https://www.cwtest086.site/",
"https://www.cwtest086.site/cars-for-sale",
"https://www.cwtest086.site/details/used-2007-chevrolet-colorado/47659032"
]
}
]
}
Each site has a "name" which is used for creating output files and for comparisons. The "urls" array tells the tool which URLs to actual track performance on.
Output (-o
, --output
)
<
5B93
svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">The directory to save reports to. Reports are saved in the Lighthouse report format in JSON.
The directory of a previously-saved report to compare to today's report.
Output the version number.
Output usage information.
Below are some common error messages that users have gotten when trying to use quickperf
.
Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
In some cases, a normal npm install
may not cause all the appropriate modules to download. If you run into this error,
you may have to install some dependencies manually.
Run npm install puppeteer
to fix this issue.