Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Stream Speed Meter
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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);
});
Something went wrong with that request. Please try again.