mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
benchmark: remove redundant timers benchmark
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>
This commit is contained in:
parent
53dae83833
commit
f2ba06db92
@ -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
Block a user