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

Function main

benchmark/streams/iter-throughput-transform.js:25–39  ·  view source on GitHub ↗
({ api, datasize, n })

Source from the content-addressed store, hash-verified

23}
24
25function main({ api, datasize, n }) {
26 const chunk = Buffer.alloc(CHUNK_SIZE, 'abcdefghij');
27 const totalOps = (datasize * n) / (1024 * 1024);
28
29 switch (api) {
30 case 'classic':
31 return benchClassic(chunk, datasize, n, totalOps);
32 case 'webstream':
33 return benchWebStream(chunk, datasize, n, totalOps);
34 case 'iter':
35 return benchIter(chunk, datasize, n, totalOps);
36 case 'iter-sync':
37 return benchIterSync(chunk, datasize, n, totalOps);
38 }
39}
40
41function benchClassic(chunk, datasize, n, totalOps) {
42 function run(cb) {

Callers

nothing calls this directly

Calls 5

allocMethod · 0.80
benchClassicFunction · 0.70
benchWebStreamFunction · 0.70
benchIterFunction · 0.70
benchIterSyncFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…