From bccee6f24d95f38652fe5bcc3a94954fc345a669 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Thu, 13 Feb 2025 23:41:54 -0800 Subject: [PATCH] Use unique pseudorandom seed on each generation --- benchmark/core.bench.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/benchmark/core.bench.js b/benchmark/core.bench.js index 1d46ed2..953fdc3 100644 --- a/benchmark/core.bench.js +++ b/benchmark/core.bench.js @@ -19,14 +19,13 @@ await benchmarkIterations('Read 1MB'.padEnd(NAME_LENGTH, '.'), 20, async () => { for await (const _ of r) { } }); -iter = 0 await benchmarkIterations('Transform 1MB'.padEnd(NAME_LENGTH, '.'), 20, async () => { const r = createRandomCSV(1000, 100, iter++).pipeThrough(new CSVTransformer(r => r.map(f => Number(f) + 1))); for await (const _ of r) { } }); await benchmark('Write 100MB'.padEnd(NAME_LENGTH, '.'), async () => { - await createRandomCSV(100000, 100, 2).pipeTo(new CSVWriter(temp)); + await createRandomCSV(100000, 100, iter++).pipeTo(new CSVWriter(temp)); }); await benchmark('Read 100MB'.padEnd(NAME_LENGTH, '.'), async () => { @@ -35,6 +34,6 @@ await benchmark('Read 100MB'.padEnd(NAME_LENGTH, '.'), async () => { }); await benchmark('Transform 100MB'.padEnd(NAME_LENGTH, '.'), async () => { - const r = createRandomCSV(100000, 100, 2).pipeThrough(new CSVTransformer(r => r.map(f => Number(f) + 1))); + const r = createRandomCSV(100000, 100, iter++).pipeThrough(new CSVTransformer(r => r.map(f => Number(f) + 1))); for await (const _ of r) { } }); -- 2.47.3