1.0.0 • Published 9 years ago

sugar-benchmark v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

#sugar-benchmark

Just a banchmark.js wrapper to speed up common tasks.

##install

# npm install sugar-benchmark

###use

var Benchmark = require('sugar-benchmark'),
suite = Benchmark.createDefault();

suite.addAsync('test1', function(cb){
 setTimeout(function(){
  	cb();
  },10)
});

suite.addAsync('test2', function(cb){
 setTimeout(function(){
  	cb();
  },20)
});

/**
OUTPUT:
test1 x 78.45 ops/sec ±0.76% (75 runs sampled)
test2 x 41.09 ops/sec ±0.64% (67 runs sampled)
**/