bench.js 268 B

123456789101112131415161718
  1. 'use strict'
  2. var split = require('./')
  3. var bench = require('fastbench')
  4. var fs = require('fs')
  5. function benchSplit (cb) {
  6. fs.createReadStream('package.json')
  7. .pipe(split())
  8. .on('end', cb)
  9. .resume()
  10. }
  11. var run = bench([
  12. benchSplit
  13. ], 10000)
  14. run(run)