%PDF- %PDF-
| Direktori : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/benchmark/process/ |
| Current File : /home/vacivi36/vittasync.vacivitta.com.br/vittasync/node/benchmark/process/queue-microtask-depth.js |
'use strict';
const common = require('../common.js');
const bench = common.createBenchmark(main, {
n: [12e5],
});
function main({ n }) {
let counter = n;
bench.start();
queueMicrotask(onNextTick);
function onNextTick() {
if (--counter)
queueMicrotask(onNextTick);
else
bench.end(n);
}
}