• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common.js');
3const bench = common.createBenchmark(main, {
4  n: [4e6]
5});
6
7function main({ n }) {
8  function onNextTick(i) {
9    if (i + 1 === n)
10      bench.end(n);
11  }
12
13  for (let i = 0; i < n; i++) {
14    process.nextTick(onNextTick, i);
15  }
16
17  bench.start();
18}
19