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

Function main

benchmark/napi/function_args/index.js:83–97  ·  view source on GitHub ↗
({ n, engine, type })

Source from the content-addressed store, hash-verified

81});
82
83function main({ n, engine, type }) {
84 const bindings = engine === 'v8' ? v8 : napi;
85 const methodName = 'callWith' + type;
86 const fn = bindings[methodName];
87
88 if (fn) {
89 const args = generateArgs(type);
90
91 bench.start();
92 for (let i = 0; i < n; i++) {
93 fn.apply(null, args);
94 }
95 bench.end(n);
96 }
97}

Callers

nothing calls this directly

Calls 4

generateArgsFunction · 0.85
startMethod · 0.45
applyMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…