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

Function benchELUSimple

benchmark/worker/bench-eventlooputil.js:31–41  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

29}
30
31function benchELUSimple(n) {
32 const worker = new Worker(__filename, { argv: ['idle cats'] });
33
34 spinUntilIdle(worker, () => {
35 bench.start();
36 for (let i = 0; i < n; i++)
37 worker.performance.eventLoopUtilization();
38 bench.end(n);
39 worker.postMessage('bye');
40 });
41}
42
43function benchELUPassed(n) {
44 const worker = new Worker(__filename, { argv: ['idle cats'] });

Callers 1

mainFunction · 0.70

Calls 4

postMessageMethod · 0.95
spinUntilIdleFunction · 0.85
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…