diff --git a/index.js b/index.js index 7e1e1d1..a1c42ef 100644 --- a/index.js +++ b/index.js @@ -27,6 +27,7 @@ console.log('') function add(bench) { exports.store.push(bench) + var id = bench.id; var len = (bench.name || (Number.isNaN(id) ? id : '')).length name_maxlen = len > name_maxlen ? len : name_maxlen var ops = bench.hz.toFixed(bench.hz < 100 ? 2 : 0) diff --git a/test.js b/test.js index 002247b..eb2faf1 100644 --- a/test.js +++ b/test.js @@ -37,6 +37,9 @@ suite.add('current', function() { .add('random blaaaah', function() { return ~getSlowRandom() ? false: true }) +.add(function() { + return ~getRandom() ? false: true +}) .on('cycle', function(event) { benchmarks.add(event.target) })