var Benchmark = require('benchmark'); var suite = new Benchmark.Suite(); suite .add("new length 0", function () { Buffer.concat([]); }) // add listeners .on('cycle', function (event) { console.log(String(event.target)); }) .on('complete', function () { console.log('Fastest is ' + this.filter('fastest').pluck('name')); }) .run({ async: false });