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 257224d

Browse filesBrowse files
deokjinkimjuanarbol
authored andcommitted
test: 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 ec34cad commit 257224d
Copy full SHA for 257224d
Expand file treeCollapse file tree

14 files changed

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

‎test/parallel/test-cluster-concurrent-disconnect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-concurrent-disconnect.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const os = require('os');
1010

1111
if (cluster.isPrimary) {
1212
const workers = [];
13-
const numCPUs = os.cpus().length;
13+
const numCPUs = os.availableParallelism();
1414
let waitOnline = numCPUs;
1515
for (let i = 0; i < numCPUs; i++) {
1616
const worker = cluster.fork();
Collapse file

‎test/parallel/test-gc-http-client-connaborted.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-gc-http-client-connaborted.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const onGC = require('../common/ongc');
88
const http = require('http');
99
const os = require('os');
1010

11-
const cpus = os.cpus().length;
11+
const cpus = os.availableParallelism();
1212
let createClients = true;
1313
let done = 0;
1414
let count = 0;
Collapse file

‎test/parallel/test-gc-net-timeout.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-gc-net-timeout.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function serverHandler(sock) {
2626
}, 100);
2727
}
2828

29-
const cpus = os.cpus().length;
29+
const cpus = os.availableParallelism();
3030
let createClients = true;
3131
let done = 0;
3232
let count = 0;
Collapse file

‎test/parallel/test-worker-memory.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-worker-memory.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const assert = require('assert');
77
const util = require('util');
88
const { Worker } = require('worker_threads');
99

10-
let numWorkers = +process.env.JOBS || require('os').cpus().length;
10+
let numWorkers = +process.env.JOBS || require('os').availableParallelism();
1111
if (numWorkers > 20) {
1212
// Cap the number of workers at 20 (as an even divisor of 60 used as
1313
// the total number of workers started) otherwise the test fails on
Collapse file

‎test/pummel/test-policy-integrity-dep.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-policy-integrity-dep.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const fs = require('fs');
2222
const path = require('path');
2323
const { pathToFileURL } = require('url');
2424

25-
const cpus = require('os').cpus().length;
25+
const cpus = require('os').availableParallelism();
2626

2727
function hash(algo, body) {
2828
const values = [];
Collapse file

‎test/pummel/test-policy-integrity-parent-commonjs.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-policy-integrity-parent-commonjs.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const fs = require('fs');
2222
const path = require('path');
2323
const { pathToFileURL } = require('url');
2424

25-
const cpus = require('os').cpus().length;
25+
const cpus = require('os').availableParallelism();
2626

2727
function hash(algo, body) {
2828
const values = [];
Collapse file

‎test/pummel/test-policy-integrity-parent-module.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-policy-integrity-parent-module.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const fs = require('fs');
2222
const path = require('path');
2323
const { pathToFileURL } = require('url');
2424

25-
const cpus = require('os').cpus().length;
25+
const cpus = require('os').availableParallelism();
2626

2727
function hash(algo, body) {
2828
const values = [];
Collapse file

‎test/pummel/test-policy-integrity-parent-no-package-json.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-policy-integrity-parent-no-package-json.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const fs = require('fs');
2222
const path = require('path');
2323
const { pathToFileURL } = require('url');
2424

25-
const cpus = require('os').cpus().length;
25+
const cpus = require('os').availableParallelism();
2626

2727
function hash(algo, body) {
2828
const values = [];
Collapse file

‎test/pummel/test-policy-integrity-worker-commonjs.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-policy-integrity-worker-commonjs.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const fs = require('fs');
2222
const path = require('path');
2323
const { pathToFileURL } = require('url');
2424

25-
const cpus = require('os').cpus().length;
25+
const cpus = require('os').availableParallelism();
2626

2727
function hash(algo, body) {
2828
const values = [];
Collapse file

‎test/pummel/test-policy-integrity-worker-module.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-policy-integrity-worker-module.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const fs = require('fs');
2222
const path = require('path');
2323
const { pathToFileURL } = require('url');
2424

25-
const cpus = require('os').cpus().length;
25+
const cpus = require('os').availableParallelism();
2626

2727
function hash(algo, body) {
2828
const values = [];

0 commit comments

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