DailyJS

Node Roundup: browser-perf, node-modules, module.exports vs. exports

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

node modules npm

Node Roundup: browser-perf, node-modules, module.exports vs. exports

Posted by Alex R. Young on .
Featured

node modules npm

Node Roundup: browser-perf, node-modules, module.exports vs. exports

Posted by Alex R. Young on .

browser-perf

browser-perf (GitHub: axemclion / browser-perf, License: BSD-2 Clause, npm: browser-perf) by Parashuram Narasimhan is a Node-based browser performance testing tool. It collects various metrics from browsers and then displays graphs using the results.

It runs as a command-line script which allows you to specify which browsers you'd like to use:

browser-perf http://example.com --browsers=chrome,firefox --selenium=ondemand.saucelabs.com --username=username --accesskey=accesskey  

There's also a Node API:

var browserPerf = require('browser-perf');  
browserPerf('http://example.com/test', 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
});

There's a [wiki page with more details](https://github.com/axemclion/browser-perf/wiki/Node-Module