CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
bench.js28 linesDownload Raw Back to split2
1'use strict'2 3const split = require('./')4const bench = require('fastbench')5const binarySplit = require('binary-split')6const fs = require('fs')7 8function benchSplit (cb) {9  fs.createReadStream('package.json')10    .pipe(split())11    .on('end', cb)12    .resume()13}14 15function benchBinarySplit (cb) {16  fs.createReadStream('package.json')17    .pipe(binarySplit())18    .on('end', cb)19    .resume()20}21 22const run = bench([23  benchSplit,24  benchBinarySplit25], 10000)26 27run(run)28