Access the Web Performance Timeline, from your browser, in your terminal!
Browsertime allows you to:
- Query timing data directly from the browser, to access Navigation Timing, User Timing, Resource Timing, first paint and RUM Speed Index.
- Generate HAR files (using HAR Export trigger for Firefox and parsing the Chrome log for Chrome).
- Run custom Javascript scripts in the browser and get statistics for each run.
- Record a video of the screen and analyze the result to get First Visual Change, Speed Index, Visual Complete 85 % and Last Visual Change.
$ bin/browsertime.js https://www.sitespeed.io
Load https://www.sitespeed.io/ in Chrome three times. Results are stored in a JSON file (browsertime.json) with the timing data, and a HAR file (browsertime.har) in browsertime-results/www.sitespeed.io/$date/
Browsertime supports Firefox and Chrome on desktop. On Android we support Chrome.
But we want to support Opera (on Android) and when(?!) iOS Safari supports WebDriver we will add that too.
Browsertime uses Selenium NodeJS to drive the browser. It starts the browser, load a URL, executes configurable Javascripts to collect metrics, collect a HAR file.
To get the HAR from Firefox we use the HAR Export Trigger and Chrome we use Chrome-HAR to parse the timeline log and generate the HAR file.
Oh and you can run your own Selenium script before (--preScript
) and after (--postScript
) a URL is accessed so you can login/logout or do whatever you want.