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

Function go

benchmark/child_process/spawn-echo.js:13–24  ·  view source on GitHub ↗
(n, left)

Source from the content-addressed store, hash-verified

11}
12
13function go(n, left) {
14 if (--left === 0)
15 return bench.end(n);
16
17 const child = spawn('echo', ['hello']);
18 child.on('exit', (code) => {
19 if (code)
20 process.exit(code);
21 else
22 go(n, left);
23 });
24}

Callers 1

mainFunction · 0.70

Calls 4

spawnFunction · 0.50
endMethod · 0.45
onMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected