Skip to content

Commit 2c024cd

Browse files
authored
test_runner: disable highWatermark on TestsStream
The default highWatermark of 16 on the TestsStream class can have a substantial impact on reporting performance. This commit sets the TestsStream highWatermark to a very large value and lets the destination streams (which are more likely to have meaningful highWatermarks) handle backpressure. PR-URL: #52287 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
1 parent 9efc84a commit 2c024cd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/internal/test_runner/tests_stream.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const {
33
ArrayPrototypePush,
44
ArrayPrototypeShift,
5+
NumberMAX_SAFE_INTEGER,
56
Symbol,
67
} = primordials;
78
const Readable = require('internal/streams/readable');
@@ -12,7 +13,11 @@ class TestsStream extends Readable {
1213
#canPush;
1314

1415
constructor() {
15-
super({ __proto__: null, objectMode: true });
16+
super({
17+
__proto__: null,
18+
objectMode: true,
19+
highWaterMark: NumberMAX_SAFE_INTEGER,
20+
});
1621
this.#buffer = [];
1722
this.#canPush = true;
1823
}

0 commit comments

Comments
 (0)