b

Benchmarks for Node.js.

B - Benchmarks for Node.js

B is small and elegant module for Node.js that makes benchmarking fun.

  • Async, sync & parrallel benchmarks
  • Streams
  • Reporters
var b = require('b');
 
b('Synchronous benchmark').run(100, function(i) {
  // do stuff 
});
var b = require('b');
 
b('Asynchronous benchmark').run(10, function(idone) {
  // do stuff 
  done();
});
b('make pretty and print to console').reporter('cli')
b('output json data').reporter('json')
function Reporter() {};
 
Reporter.prototype.report = function(nameresultiterations) {
  // report it 
};
 
b('Custom reporter')
  .reporter(new Reporter)
  .run(10, function() {
    // benchmark stuff 
  });
  • start
  • stop
  • done
  • NPM (http://npmjs.org/)
  • Node.js 0.8 (http://nodejs.org/)
$ npm install b
$ npm install
$ make test
 project  : b
 repo age : 11 months ago
 active   : 5 days
 commits  : 46
 files    : 16
 authors  :
    29  Veselin Todorov         63.0%
    16  jkroso                  34.8%
     1  Jakeb                   2.2%

MIT License

Copyright (C) 2012 Veselin Todorov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.