MCPcopy Create free account
hub / github.com/nodejs/node / generateTrace

Function generateTrace

test/parallel/test-inspector-tracing-domain.js:30–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30function generateTrace() {
31 return new Promise((resolve) => setTimeout(() => {
32 for (let i = 0; i < 1000000; i++) {
33 'test' + i; // eslint-disable-line no-unused-expressions
34 }
35 resolve();
36 }, 1));
37}
38
39async function test() {
40 // This interval ensures Node does not terminate till the test is finished.

Callers 1

testFunction · 0.85

Calls 2

setTimeoutFunction · 0.50
resolveFunction · 0.50

Tested by 1

testFunction · 0.68