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

Function main

benchmark/dns/lookup.js:12–35  ·  view source on GitHub ↗
({ name, n, all })

Source from the content-addressed store, hash-verified

10});
11
12function main({ name, n, all }) {
13 let i = 0;
14
15 if (all === 'true') {
16 const opts = { all: true };
17 bench.start();
18 (function cb() {
19 if (i++ === n) {
20 bench.end(n);
21 return;
22 }
23 lookup(name, opts, cb);
24 })();
25 } else {
26 bench.start();
27 (function cb() {
28 if (i++ === n) {
29 bench.end(n);
30 return;
31 }
32 lookup(name, cb);
33 })();
34 }
35}

Callers

nothing calls this directly

Calls 3

lookupFunction · 0.50
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected