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

Function source

benchmark/streams/iter-throughput-pipeto.js:87–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 async function run() {
86 let remaining = datasize;
87 async function* source() {
88 while (remaining > 0) {
89 const size = Math.min(remaining, chunk.length);
90 remaining -= size;
91 yield [size === chunk.length ? chunk : chunk.subarray(0, size)];
92 }
93 }
94 // Provide writeSync for the sync fast path in pipeTo
95 const writer = { write() {}, writeSync() { return true; } };
96 await pipeTo(source(), writer);

Callers 2

runFunction · 0.70
benchIterSyncFunction · 0.70

Calls 1

minMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…