diff --git a/packages/parser/src/lib/parseString.bench.ts b/packages/parser/src/lib/parseString.bench.ts index 97e6034..aa65d60 100644 --- a/packages/parser/src/lib/parseString.bench.ts +++ b/packages/parser/src/lib/parseString.bench.ts @@ -7,27 +7,30 @@ import { parseString } from "./parseString.js"; describe.each([50, 100, 500, 1_000])("%d row", (row) => { const string = getStringCSV(row); - bench(`parse a string ${row} CSV to an AsyncIterableIterator`, async () => { - for await (const _ of parseString(string)) { - // noop - } - }); - - bench(`parse a string ${row} CSV to an Array`, () => { + bench( + `parse a string ${row} row CSV to an AsyncIterableIterator`, + async () => { + for await (const _ of parseString(string)) { + // noop + } + }, + ); + + bench(`parse a string ${row} row CSV to an Array`, () => { parseString.toArraySync(string); }); - bench(`parse a string ${row} CSV to a Promise`, async () => { + bench(`parse a string ${row} row CSV to a Promise`, async () => { await parseString.toArray(string); }); - bench(`parse a string ${row} CSV to a IterableIterator`, () => { + bench(`parse a string ${row} row CSV to a IterableIterator`, () => { for (const _ of parseString.toIterableIterator(string)) { // noop } }); - bench(`parse a string ${row} CSV to a ReadableStream`, async () => { + bench(`parse a string ${row} row CSV to a ReadableStream`, async () => { await parseString.toStream(string).pipeTo( new WritableStream({ write(_) {