Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.
/ web-perf-test Public archive

Automated web performance test using Puppeteer.

License

Notifications You must be signed in to change notification settings

jinwoo/web-perf-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web-perf-test: Web performance measuring tool using Puppeteer

This 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.

Installation

$ npm install -g web-perf-test

Usage

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

What is measured?

web-perf-test loads the given page using Puppeteer and evaluates the loading time using the PerformanceTiming data in the browser.

More specifically, it calculates loadEventEnd - requestStart. loadEventEnd represents the moment when the load event is completed, and requestStart represents the moment when the browser sent the request to obtain the actual document.

How are the data measured?

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.