Stream Speed Meter
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
index.js
package.json

README.md

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);
});