Skip to content

Commit 0fa857f

Browse files
Trottjasnell
authored andcommittedOct 17, 2018
test: add logging to test-worker-memory
To help troubleshoot CI failures, add some logging. Refs: #23277 (comment) PR-URL: #23418 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1 parent 2f83ddc commit 0fa857f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

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

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const numWorkers = +process.env.JOBS || require('os').cpus().length;
1010
// Verify that a Worker's memory isn't kept in memory after the thread finishes.
1111

1212
function run(n, done) {
13+
console.log(`run() called with n=${n} (numWorkers=${numWorkers})`);
1314
if (n <= 0)
1415
return done();
1516
const worker = new Worker(
@@ -27,6 +28,7 @@ const startStats = process.memoryUsage();
2728
let finished = 0;
2829
for (let i = 0; i < numWorkers; ++i) {
2930
run(60 / numWorkers, () => {
31+
console.log(`done() called (finished=${finished})`);
3032
if (++finished === numWorkers) {
3133
const finishStats = process.memoryUsage();
3234
// A typical value for this ratio would be ~1.15.

0 commit comments

Comments
 (0)