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

Function main

benchmark/test_runner/test-reporters.js:21–41  ·  view source on GitHub ↗
({ n, reporter: r })

Source from the content-addressed store, hash-verified

19let testResults;
20
21async function main({ n, reporter: r }) {
22 testResults ??= await stream.toArray();
23
24 // Create readable streams for each iteration
25 const readables = Array.from({ length: n }, () => Readable.from(testResults));
26
27 // Get the selected reporter
28 const reporter = reporters[r];
29
30 bench.start();
31
32 let noDead;
33 for (const readable of readables) {
34 // Process each readable stream through the reporter
35 noDead = await readable.compose(reporter).toArray();
36 }
37
38 bench.end(n);
39
40 assert.ok(noDead);
41}

Callers

nothing calls this directly

Calls 6

toArrayMethod · 0.65
fromMethod · 0.45
startMethod · 0.45
composeMethod · 0.45
endMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…