From c8f0a6065ffdd9e0411c2a216e63d9dd6213cb75 Mon Sep 17 00:00:00 2001 From: mrmlnc Date: Sat, 27 May 2023 14:12:24 +0300 Subject: [PATCH] chore: disable concurrency for benchmarks Other solutions utilize all available cores. --- src/benchmark/suites/product/async.ts | 3 ++- src/benchmark/suites/product/stream.ts | 3 ++- src/benchmark/suites/regression/async.ts | 1 + src/benchmark/suites/regression/stream.ts | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/benchmark/suites/product/async.ts b/src/benchmark/suites/product/async.ts index b19c0cdb..2e361d2f 100644 --- a/src/benchmark/suites/product/async.ts +++ b/src/benchmark/suites/product/async.ts @@ -25,7 +25,8 @@ class Glob { await this._measure(() => glob(this._pattern, { cwd: this._cwd, unique: false, - followSymbolicLinks: false + followSymbolicLinks: false, + concurrency: Number.POSITIVE_INFINITY })); } diff --git a/src/benchmark/suites/product/stream.ts b/src/benchmark/suites/product/stream.ts index e720883f..f1259bf5 100644 --- a/src/benchmark/suites/product/stream.ts +++ b/src/benchmark/suites/product/stream.ts @@ -37,7 +37,8 @@ class Glob { const stream = glob.stream(this._pattern, { cwd: this._cwd, unique: false, - followSymbolicLinks: false + followSymbolicLinks: false, + concurrency: Number.POSITIVE_INFINITY }); const action = new Promise((resolve, reject) => { diff --git a/src/benchmark/suites/regression/async.ts b/src/benchmark/suites/regression/async.ts index 0d01e098..ef898cdf 100644 --- a/src/benchmark/suites/regression/async.ts +++ b/src/benchmark/suites/regression/async.ts @@ -16,6 +16,7 @@ class Glob { this._options = { unique: false, followSymbolicLinks: false, + concurrency: Number.POSITIVE_INFINITY, ...options }; } diff --git a/src/benchmark/suites/regression/stream.ts b/src/benchmark/suites/regression/stream.ts index 2651e865..5fa852f1 100644 --- a/src/benchmark/suites/regression/stream.ts +++ b/src/benchmark/suites/regression/stream.ts @@ -16,6 +16,7 @@ class Glob { this._options = { unique: false, followSymbolicLinks: false, + concurrency: Number.POSITIVE_INFINITY, ...options }; }