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

Function main

benchmark/napi/ref/index.js:10–19  ·  view source on GitHub ↗
({ n })

Source from the content-addressed store, hash-verified

8}
9
10function main({ n }) {
11 addon.count = 0;
12 bench.start();
13 new Promise((resolve) => {
14 (function oneIteration() {
15 callNewWeak();
16 setImmediate(() => ((addon.count < n) ? oneIteration() : resolve()));
17 })();
18 }).then(() => bench.end(n));
19}

Callers

nothing calls this directly

Calls 6

callNewWeakFunction · 0.85
setImmediateFunction · 0.50
resolveFunction · 0.50
startMethod · 0.45
thenMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…