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

Function main

benchmark/process/coverage.js:15–31  ·  view source on GitHub ↗
({ n })

Source from the content-addressed store, hash-verified

13const coverageDir = tmpdir.resolve(`cov-${Date.now()}`);
14
15function main({ n }) {
16 bench.start();
17 const result = spawnSync(process.execPath, [
18 require.resolve('../fixtures/coverage-many-branches'),
19 ], {
20 env: {
21 NODE_V8_COVERAGE: coverageDir,
22 N: n,
23 ...process.env,
24 },
25 });
26 bench.end(n);
27 rmSync(coverageDir, { recursive: true, force: true });
28 if (result.status !== 0) {
29 throw new Error(result.stderr.toString('utf8'));
30 }
31}

Callers

nothing calls this directly

Calls 6

spawnSyncFunction · 0.50
rmSyncFunction · 0.50
startMethod · 0.45
resolveMethod · 0.45
endMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…