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

Function run

benchmark/async_hooks/promises.js:41–47  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

39
40const err = new Error('foobar');
41async function run(n) {
42 for (let i = 0; i < n; i++) {
43 await new Promise((resolve) => resolve())
44 .then(() => { throw err; })
45 .catch((e) => e);
46 }
47}
48
49function main({ n, asyncHooks }) {
50 if (hook) hook.disable();

Callers 1

mainFunction · 0.70

Calls 2

resolveFunction · 0.50
thenMethod · 0.45

Tested by

no test coverage detected