diff --git a/benchmark/streams/iter-throughput-share.js b/benchmark/streams/iter-throughput-share.js index a0383172c04..c17444d8103 100644 --- a/benchmark/streams/iter-throughput-share.js +++ b/benchmark/streams/iter-throughput-share.js @@ -5,7 +5,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { consumers: [2, 8, 32], batches: [1e4], - backpressure: ['block'], + backpressure: ['unbounded'], n: [5], }, { flags: ['--experimental-stream-iter'], @@ -24,7 +24,7 @@ async function main({ consumers, batches, backpressure, n }) { bench.start(); for (let i = 0; i < n; i++) { - const shared = share(source(), { highWaterMark: 64, backpressure }); + const shared = share(source(), { budget: 65536, backpressure }); const readers = Array.from({ length: consumers }, () => array(shared.pull())); await Promise.all(readers); } diff --git a/doc/api/quic.md b/doc/api/quic.md index c366d1d7292..88a291fc6d5 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -1276,7 +1276,7 @@ added: v23.8.0 interleaved with data from other streams of the same priority level. When `false`, the stream should be completed before same-priority peers. **Default:** `false`. - * `highWaterMark` {number} The maximum number of bytes that the writer + * `budget` {number} The maximum number of bytes that the writer will buffer before `writeSync()` returns `false`. When the buffered data exceeds this limit, the caller should wait for drain before writing more. **Default:** `65536` (64 KB). @@ -1317,7 +1317,7 @@ added: v23.8.0 interleaved with data from other streams of the same priority level. When `false`, the stream should be completed before same-priority peers. **Default:** `false`. - * `highWaterMark` {number} The maximum number of bytes that the writer + * `budget` {number} The maximum number of bytes that the writer will buffer before `writeSync()` returns `false`. When the buffered data exceeds this limit, the caller should wait for drain before writing more. **Default:** `65536` (64 KB). @@ -1924,7 +1924,7 @@ added: v23.8.0 The directionality of the stream, or `null` if the stream has been destroyed or is still pending. Read only. -### `stream.highWaterMark` +### `stream.budget`