From a9bc3cf39bc615bfa63b5b48b61cb847fdf84c52 Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Mon, 2 Jan 2023 13:15:37 +0900 Subject: benchmark,tools: use os.availableParallelism() Refs: https://github.com/nodejs/node/pull/45895 PR-URL: https://github.com/nodejs/node/pull/46003 Reviewed-By: Moshe Atlow Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli --- benchmark/_http-benchmarkers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'benchmark') diff --git a/benchmark/_http-benchmarkers.js b/benchmark/_http-benchmarkers.js index ec0e80a9e7..e8c5ee7711 100644 --- a/benchmark/_http-benchmarkers.js +++ b/benchmark/_http-benchmarkers.js @@ -65,7 +65,7 @@ class WrkBenchmarker { const args = [ '-d', duration, '-c', options.connections, - '-t', Math.min(options.connections, require('os').cpus().length || 8), + '-t', Math.min(options.connections, require('os').availableParallelism() || 8), `${scheme}://127.0.0.1:${options.port}${options.path}`, ]; for (const field in options.headers) { -- cgit v1.2.1