Benchmark binary streams. Mostly a copy paste of benchmark/net-pipe
Usage
var streamBench = http = fs = http
Options
All the options are passed to the underlying stream, so lowWaterMark
, highWaterMark
,
bufferSize
, etc are all valid.
interval
: How often to calculate throughput (in ms). Default1000
metric
: In what metric to report (bits
,kbits
,mbits
,gbits
,bytes
,kbytes
,mbytes
,gbytes
). Defaultmbits
logReport
: Whether to log report to stdout. Defaultfalse
dump
: Whether to dump data read from input stream. Useful when you won't pipe to another stream. Defaultfalse
TODO
- tests
- custom calculator function (eg for object streams)