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