Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions benchmark/streams/iter-throughput-share.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand All @@ -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);
}
Expand Down
9 changes: 5 additions & 4 deletions doc/api/quic.md
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,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).
Expand Down Expand Up @@ -1337,7 +1337,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).
Expand Down Expand Up @@ -1944,7 +1944,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`

<!-- YAML
added: v26.2.0
Expand Down Expand Up @@ -2256,7 +2256,8 @@ The Writer has the following methods:
the QUIC transport-layer `INTERNAL_ERROR` (`0x1`) for raw QUIC).
See [`stream.destroy()`][] for a full-stream abort that also resets
the readable side via `STOP_SENDING`.
* `desiredSize` — Available capacity in bytes, or `null` if closed/errored.
* `canWrite` — `true` if writes will be accepted, `false` if at capacity,
or `null` if closed/errored.

The bytes from each `writeSync()` / `writevSync()` / `write()` / `writev()`
input chunk are copied into an internal buffer, so the caller's source
Expand Down
Loading
Loading