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

Function source

benchmark/streams/iter-throughput-identity.js:97–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95 async function run() {
96 let remaining = datasize;
97 async function* source() {
98 while (remaining > 0) {
99 const size = Math.min(remaining, chunk.length);
100 remaining -= size;
101 yield [size === chunk.length ? chunk : chunk.subarray(0, size)];
102 }
103 }
104 // Drain to no-op sink, matching classic/webstream behavior
105 await pipeTo(source(), { write() {}, writeSync() { return true; } });
106 }

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…