Measure browser rendering performance metrics
npm install browser-perfabout:tracing, Chrome Devtools timeline, IE UI Responsiveness tab, Xperf, etc.
npm install -g browser-perf and then run
$ browser-perf http://yourwebsite.com --browsers=chrome,firefox --selenium=ondemand.saucelabs.com --username=username --accesskey=accesskey
`
- Replace username and access key with the saucelabs.com username and accesskey
- If you have Selenium set up, you could substitute ondemand.saucelabs.com with localhost:4444/wd/hub
- You can also use BrowserStack credentials and substitute ondemand.saucelabs.com with hub.browserstack.com
See the wiki page for an extensive list of command line options and more usage scenarios.
Here is a video of the command line usage

Node Module
browser-perf is also a node module and has the following API
`javascript
var browserPerf = require('browser-perf');
browserPerf('/URL of the page to be tested/', function(err, res) {
// res - array of objects. Metrics for this URL
if (err) {
console.log('ERROR: ' + err);
} else {
console.log(res);
}
}, {
selenium: 'http://localhost:4444/wd/hub',
browsers: ['chrome', 'firefox']
username: SAUCE_USERNAME // if running tests on the cloud
});
``