var benchmark = require('benchmark') var suite = new benchmark.Suite() global.NewBuffer = require('../../').Buffer // native-buffer-browserify var LENGTH = 16 var newBuf = NewBuffer(LENGTH) suite.add('NewBuffer#slice', function () { var x = newBuf.slice(4) }) .on('error', function (event) { console.error(event.target.error.stack) }) .on('cycle', function (event) { console.log(String(event.target)) }) .run({ 'async': true })