summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorDeokjin Kim <deokjin81.kim@gmail.com>2023-01-02 13:15:37 +0900
committerNode.js GitHub Bot <github-bot@iojs.org>2023-01-11 20:07:57 +0000
commita9bc3cf39bc615bfa63b5b48b61cb847fdf84c52 (patch)
treeab67a0e3b7a99241af2e4643d337a7487409c453 /benchmark
parentd8014f6aa9670378609bfe8e76ba045759ae0d58 (diff)
downloadnode-new-a9bc3cf39bc615bfa63b5b48b61cb847fdf84c52.tar.gz
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 <moshe@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/_http-benchmarkers.js2
1 files changed, 1 insertions, 1 deletions
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) {