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

Function benchmarkDefine

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

Source from the content-addressed store, hash-verified

15const noop = () => {};
16
17function benchmarkDefine(n) {
18 let noDead;
19 test((t) => {
20 bench.start();
21 for (let i = 0; i < n; i++) {
22 noDead = t.mock.fn(noop);
23 }
24 bench.end(n);
25 assert.ok(noDead);
26 });
27}
28
29function benchmarkExecute(n) {
30 let noDead;

Callers 1

mainFunction · 0.85

Calls 5

testFunction · 0.50
startMethod · 0.45
fnMethod · 0.45
endMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected