MCPcopy Create free account
hub / github.com/nodejs/node / main

Function main

benchmark/readline/readline-iterable.js:67–82  ·  view source on GitHub ↗
({ n, type })

Source from the content-addressed store, hash-verified

65}
66
67async function main({ n, type }) {
68 bench.start();
69 let lineCount = 0;
70
71 const iterable = readline.createInterface({
72 input: getLoremIpsumStream(n),
73 });
74
75 const readlineIterable = type === 'old' ? oldWay.call(iterable) : iterable;
76
77 // eslint-disable-next-line no-unused-vars
78 for await (const _ of readlineIterable) {
79 lineCount++;
80 }
81 bench.end(lineCount);
82}

Callers

nothing calls this directly

Calls 4

getLoremIpsumStreamFunction · 0.85
startMethod · 0.45
callMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected