speed-meter
v0.0.1
Published
Stream Speed Meter
Downloads
3
Readme
Speed Meter
Measure the speed of a readable stream
Install
$ npm install speed-meter --save
Use
var Meter = require('speed-meter');
var stream = require('fs').createReadStream('/path/to/my/file');
var meter = Meter(stream);
var interval = setInterval(function() {
console.log('reading at ' + meter.speed + ' bytes / sec');
}, 1000);
stream.on('end', function() {
clearInterval(interval);
});