0.1.2 • Published 11 years ago

stream-bench v0.1.2

Weekly downloads
19
License
-
Repository
github
Last release
11 years ago

Benchmark binary streams. Mostly a copy paste of benchmark/net-pipe

Usage

var streamBench = require('stream-bench')
  , http        = require('http')
  , fs          = require('fs')

http.get('http://nodejs.org/dist/latest/node-v0.8.19.tar.gz', function (res) {
  var out = fs.createWriteStream('./out')

  var bench = streamBench({
    interval: 100,
    rate:     'mbytes'
  })

  bench.on('rate', function (rate) {
    console.log('rate: ', rate)
  })

  bench.once('report', function (report) {
    console.log(report)
  })

  res.pipe(bench).pipe(out)
})

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.1

11 years ago