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

Function main

benchmark/fs/bench-stat.js:12–31  ·  view source on GitHub ↗
({ n, statType })

Source from the content-addressed store, hash-verified

10
11
12function main({ n, statType }) {
13 let arg;
14 if (statType === 'fstat')
15 arg = fs.openSync(__filename, 'r');
16 else
17 arg = __filename;
18
19 bench.start();
20 (function r(cntr, fn) {
21 if (cntr-- <= 0) {
22 bench.end(n);
23 if (statType === 'fstat')
24 fs.closeSync(arg);
25 return;
26 }
27 fn(arg, () => {
28 r(cntr, fn);
29 });
30 }(n, fs[statType]));
31}

Callers

nothing calls this directly

Calls 6

fnFunction · 0.50
rFunction · 0.50
openSyncMethod · 0.45
startMethod · 0.45
endMethod · 0.45
closeSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…