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

Function benchmarkExecute

benchmark/test_runner/mock-fn.js:29–40  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

27}
28
29function benchmarkExecute(n) {
30 let noDead;
31 test((t) => {
32 const mocked = t.mock.fn(noop);
33 bench.start();
34 for (let i = 0; i < n; i++) {
35 noDead = mocked();
36 }
37 bench.end(n);
38 assert.strictEqual(noDead, noop());
39 });
40}
41
42function main({ n, mode }) {
43 if (mode === 'define') {

Callers 1

mainFunction · 0.85

Calls 5

noopFunction · 0.70
testFunction · 0.50
fnMethod · 0.45
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…