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

Function benchClassic

benchmark/fs/bench-filehandle-pull-vs-webstream.js:68–77  ·  view source on GitHub ↗
(n, filesize)

Source from the content-addressed store, hash-verified

66// Classic streams path: createReadStream -> Transform (upper) -> createGzip
67// ---------------------------------------------------------------------------
68async function benchClassic(n, filesize) {
69 await runClassic();
70
71 bench.start();
72 let totalBytes = 0;
73 for (let i = 0; i < n; i++) {
74 totalBytes += await runClassic();
75 }
76 bench.end(totalBytes / (1024 * 1024));
77}
78
79function runClassic() {
80 return new Promise((resolve, reject) => {

Callers 1

mainFunction · 0.70

Calls 3

runClassicFunction · 0.85
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected