IOTConnect-Web/node_modules/vue-mqtt/node_modules/split2/bench.js
2024-05-09 09:49:52 +08:00

19 lines
268 B
JavaScript

'use strict'
var split = require('./')
var bench = require('fastbench')
var fs = require('fs')
function benchSplit (cb) {
fs.createReadStream('package.json')
.pipe(split())
.on('end', cb)
.resume()
}
var run = bench([
benchSplit
], 10000)
run(run)