Automated web performance test using Puppeteer.
npm install web-perf-testweb-perf-test: Web performance measuring tool using PuppeteerThis is a pretty simple CLI tool for measuring the initial page loading time
of a web site, using
Puppeteer.
It measures until the timing data is considered stable and prints out the
statistics together with a box plot.
``shell`
$ npm install -g web-perf-test
`
usage: web-perf-test [-h] [-v] [--show-chrome] url
Automated web performance test using Puppeteer.
Positional arguments:
url URL of the page to measure
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
--show-chrome Make the Chromium browser visible
`
web-perf-test loads the given page using Puppeteer and evaluates thePerformanceTiming
loading time using the
data in the browser.
More specifically, it calculates loadEventEnd - requestStart.loadEventEndrequestStart`
represents the moment when the load event is completed, and
represents the moment when the browser sent the request to obtain the actual
document.
The loading time is measured at least 25 times. After that, the tool checks
if the data is stable. If it is not stable, keep measuring until it becomes
stable or the total number of measurements is 50.
The data is considered stable when the median is stable, which means that its
interquartile range
(IQR) is <= 1% of the
median. The idea is borrowed from the *Rules of Thumb for HTTP/2
Push*
document.