MCPcopy Index your code
hub / github.com/nodejs/node / depth

Function depth

benchmark/timers/immediate.js:33–44  ·  view source on GitHub ↗
(N)

Source from the content-addressed store, hash-verified

31
32// setImmediate tail recursion, 0 arguments
33function depth(N) {
34 let n = 0;
35 bench.start();
36 setImmediate(cb);
37 function cb() {
38 n++;
39 if (n === N)
40 bench.end(n);
41 else
42 setImmediate(cb);
43 }
44}
45
46// setImmediate tail recursion, 1 argument
47function depth1(N) {

Callers 3

mainFunction · 0.70
reifyOutputFunction · 0.50
printHumanMethod · 0.50

Calls 2

setImmediateFunction · 0.50
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…