Skip to content

Instantly share code, notes, and snippets.

@7h3kk1d
Created August 18, 2014 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 7h3kk1d/cda429a27528a4b285f0 to your computer and use it in GitHub Desktop.
Save 7h3kk1d/cda429a27528a4b285f0 to your computer and use it in GitHub Desktop.
var Benchmark = require('benchmark');
var suite = new Benchmark.Suite;
// add tests
suite.add('Calling cow api', {
defer: true,
fn: function(deferred) {
deferred.resolve();
}
})
// add listeners
.on('cycle', function(event) {
console.log(String(event.target));
})
// run async
.run({ 'async': true });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment