
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
stream-bench
Advanced tools
Benchmark binary streams. Mostly a copy paste of benchmark/net-pipe
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,
metric: 'mbytes'
})
bench.on('rate', function (rate) {
console.log('rate: ', rate)
})
bench.once('report', function (report) {
console.log(report)
})
res.pipe(bench).pipe(out)
})
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). Default 1000
metric
: In what metric to report (bits
, kbits
, mbits
, gbits
, bytes
, kbytes
, mbytes
, gbytes
). Default mbits
logReport
: Whether to log report to stdout. Default false
dump
: Whether to dump data read from input stream. Useful when you won't pipe to another stream. Default false
FAQs
Node streams benchmarking (throughput, etc)
The npm package stream-bench receives a total of 555 weekly downloads. As such, stream-bench popularity was classified as not popular.
We found that stream-bench demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.