1.0.1 • Published 8 years ago

benchjs v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

BenchJS

BenchJS is simple benchmark time track Node.js library

The following snippet:

var bench = require('benchjs');

// Benchmark the time between executions
var start = bench.mark();
setTimeout(function() {
    var time = bench.mark(start);
    console.log(time);
}, 2000);

Will print:

{
    nanoseconds: 5480017,
    microseconds: 5480,
    milliseconds: 5,
    seconds: '02',
    minutes: '00',
    hours: '00',
    time: '00:00:02.5',
    message: '[00:00:02.5]'
}

Installation

$ npm install -s benchjs

Contributing

This package is under development. Pull requests are welcomed.

People

The current lead maintainer is Hugo Santos

License

ISC