Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e1c56ec

Browse filesBrowse files
deokjinkimRafaelGSS
authored andcommitted
benchmark,tools: use os.availableParallelism()
Refs: #45895 PR-URL: #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>
1 parent 6e2f722 commit e1c56ec
Copy full SHA for e1c56ec

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎benchmark/_http-benchmarkers.js‎

Copy file name to clipboardExpand all lines: benchmark/_http-benchmarkers.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class WrkBenchmarker {
6565
const args = [
6666
'-d', duration,
6767
'-c', options.connections,
68-
'-t', Math.min(options.connections, require('os').cpus().length || 8),
68+
'-t', Math.min(options.connections, require('os').availableParallelism() || 8),
6969
`${scheme}://127.0.0.1:${options.port}${options.path}`,
7070
];
7171
for (const field in options.headers) {
Collapse file

‎tools/build-addons.mjs‎

Copy file name to clipboardExpand all lines: tools/build-addons.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import os from 'node:os';
1111

1212
const execFile = util.promisify(child_process.execFile);
1313

14-
const parallelization = +process.env.JOBS || os.cpus().length;
14+
const parallelization = +process.env.JOBS || os.availableParallelism();
1515
const nodeGyp = process.argv[2];
1616
const directory = process.argv[3];
1717

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.