mirror of https://github.com/lukechilds/node.git
Browse Source
The immediate.js benchmark with `type` set to `depth` measures the same thing as set-immediate-depth.js. Remove the redundancy.` PR-URL: https://github.com/nodejs/node/pull/13009 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>v6
1 changed files with 0 additions and 22 deletions
@ -1,22 +0,0 @@ |
|||
'use strict'; |
|||
|
|||
const common = require('../common.js'); |
|||
const bench = common.createBenchmark(main, { |
|||
millions: [10] |
|||
}); |
|||
|
|||
function main(conf) { |
|||
const N = +conf.millions * 1e6; |
|||
let n = N; |
|||
|
|||
process.on('exit', function() { |
|||
bench.end(N / 1e6); |
|||
}); |
|||
|
|||
bench.start(); |
|||
setImmediate(onNextTick); |
|||
function onNextTick() { |
|||
if (--n) |
|||
setImmediate(onNextTick); |
|||
} |
|||
} |
Loading…
Reference in new issue