From de2d7c6f35e50a6cfe62b03cb81041c16f0e8b20 Mon Sep 17 00:00:00 2001 From: Ali Hassan Date: Tue, 3 Mar 2026 15:44:28 +0500 Subject: [PATCH] benchmark: reduce config for fs benchmarks Remove redundant configuration values from four fs benchmark files to reduce total benchmark suite runtime without losing code path coverage. Refs: https://github.com/nodejs/performance/issues/186 --- benchmark/fs/read-stream-throughput.js | 2 +- benchmark/fs/readfile-promises.js | 2 -- benchmark/fs/write-stream-throughput.js | 2 +- benchmark/fs/writefile-promises.js | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/benchmark/fs/read-stream-throughput.js b/benchmark/fs/read-stream-throughput.js index e3705b6c327f45..d4f7dbcc324b3f 100644 --- a/benchmark/fs/read-stream-throughput.js +++ b/benchmark/fs/read-stream-throughput.js @@ -12,7 +12,7 @@ const filename = tmpdir.resolve(`.removeme-benchmark-garbage-${process.pid}`); const bench = common.createBenchmark(main, { encodingType: ['buf', 'asc', 'utf'], filesize: [1000 * 1024], - highWaterMark: [1024, 4096, 65535, 1024 * 1024], + highWaterMark: [1024, 65535, 1024 * 1024], n: 1024, }); diff --git a/benchmark/fs/readfile-promises.js b/benchmark/fs/readfile-promises.js index f1df92931b35a0..9278c2275faed0 100644 --- a/benchmark/fs/readfile-promises.js +++ b/benchmark/fs/readfile-promises.js @@ -17,8 +17,6 @@ const bench = common.createBenchmark(main, { 1024, 512 * 1024, 4 * 1024 ** 2, - 8 * 1024 ** 2, - 16 * 1024 ** 2, 32 * 1024 ** 2, ], concurrent: [1, 10], diff --git a/benchmark/fs/write-stream-throughput.js b/benchmark/fs/write-stream-throughput.js index 288799439725a4..eb2530605cf0de 100644 --- a/benchmark/fs/write-stream-throughput.js +++ b/benchmark/fs/write-stream-throughput.js @@ -11,7 +11,7 @@ const filename = tmpdir.resolve(`.removeme-benchmark-garbage-${process.pid}`); const bench = common.createBenchmark(main, { dur: [5], encodingType: ['buf', 'asc', 'utf'], - size: [2, 1024, 65535, 1024 * 1024], + size: [1024, 65535, 1024 * 1024], }); function main({ dur, encodingType, size }) { diff --git a/benchmark/fs/writefile-promises.js b/benchmark/fs/writefile-promises.js index f271d837115406..123cf17514a372 100644 --- a/benchmark/fs/writefile-promises.js +++ b/benchmark/fs/writefile-promises.js @@ -13,7 +13,7 @@ let filesWritten = 0; const bench = common.createBenchmark(main, { duration: [5], encodingType: ['buf', 'asc', 'utf'], - size: [2, 1024, 65535, 1024 * 1024], + size: [1024, 65535, 1024 * 1024], concurrent: [1, 10], });