It's browser time!
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, generated by running a BrowserMob Proxy instance.
Data from Browsertime is included in speed reports generated by sitespeed.io.
A simple example
> browsertime -u http://www.browsertime.net
Load www.browsertime.net in Chrome three times. Results are stored in a json file (www.browsertime.net.json) with the timing data, and a har file (www.browsertime.net.har).
Digging deeper
> browsertime -u http://www.sitespeed.io -n 9 -b firefox -w 600x800 --filename sitespeed.json --harFile sitespeed.har
Start firefox and load www.sitespeed.io nine times, to get a better statistical sample. Statistical median, percentiles and more are outputted to sitespeed.json, including all individual measurement values. The window size is fixed at 600 times 800 pixels.
Using the excellent tool jq, query the timing data to find the 99th percentile of the pageLoadTime metric; 4061 milliseconds.
> jq '.statistics[] | select(.name == "pageLoadTime").p99 ' -r sitespeed.json
> 4061
All available options for controlling Browsertime are documented when running
> browsertime -h
Installation
Browsertime is built using Node.js, and installed via npm.
> npm install browsertime -g
Authors
Follow Browsertime on Twitter: @browsertime
Copyright and license
Copyright 2014 Tobias Lidskog & Peter Hedenskog under the Apache 2.0 license.