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

Function main

benchmark/streams/readable-boundaryread.js:11–25  ·  view source on GitHub ↗
({ n, type })

Source from the content-addressed store, hash-verified

9});
10
11function main({ n, type }) {
12 const s = new Readable();
13 let data = 'a'.repeat(32);
14 if (type === 'buffer')
15 data = Buffer.from(data);
16 s._read = function() {};
17
18 bench.start();
19 for (let k = 0; k < n; ++k) {
20 for (let i = 0; i < 1e4; ++i)
21 s.push(data);
22 while (s.read(32));
23 }
24 bench.end(n);
25}

Callers

nothing calls this directly

Calls 5

fromMethod · 0.45
startMethod · 0.45
pushMethod · 0.45
readMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…