diff options
Diffstat (limited to 'deps/node/benchmark/timers/timers-insert-unpooled.js')
-rw-r--r-- | deps/node/benchmark/timers/timers-insert-unpooled.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/deps/node/benchmark/timers/timers-insert-unpooled.js b/deps/node/benchmark/timers/timers-insert-unpooled.js deleted file mode 100644 index 232cc7c3..00000000 --- a/deps/node/benchmark/timers/timers-insert-unpooled.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; -const common = require('../common.js'); -const assert = require('assert'); - -const bench = common.createBenchmark(main, { - n: [1e6], - direction: ['start', 'end'] -}); - -function main({ direction, n }) { - const timersList = []; - - var i; - bench.start(); - if (direction === 'start') { - for (i = 1; i <= n; i++) { - timersList.push(setTimeout(cb, i)); - } - } else { - for (i = n; i > 0; i--) { - timersList.push(setTimeout(cb, i)); - } - } - bench.end(n); - - for (var j = 0; j < n; j++) { - clearTimeout(timersList[j]); - } -} - -function cb() { - assert.fail(`Timer ${this._idleTimeout} should not call callback`); -} |