Skip to content

benchmark: respect stream/iter broadcast backpressure#63314

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-throughput-broadcast
Open

benchmark: respect stream/iter broadcast backpressure#63314
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:stream-iter-throughput-broadcast

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented May 15, 2026

This updates the stream/iter broadcast throughput benchmark to respect
backpressure from writer.writeSync().

Previously, the benchmark decremented remaining before checking whether
writeSync() accepted the chunk. Under default strict backpressure, rejected
writes could still be counted toward the benchmarked byte total. The iter path
now falls back to await writer.write(buf) for the same chunk and only counts it
after the write is accepted.


Assisted-by: openai:gpt-5.5

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/performance

@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. stream Issues and PRs related to the stream subsystem. labels May 15, 2026
Only decrement the remaining byte count after a stream/iter broadcast
write is accepted. If writeSync() is blocked by strict backpressure,
fall back to the async write() path for the same chunk.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@trivikr trivikr force-pushed the stream-iter-throughput-broadcast branch from 1da5fa8 to 88ee786 Compare May 15, 2026 01:06
@trivikr trivikr changed the title benchmark: respect broadcast backpressure benchmark: respect stream/iter broadcast backpressure May 15, 2026
@trivikr trivikr self-assigned this May 15, 2026
@trivikr trivikr added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels May 15, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 15, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. benchmark Issues and PRs related to the benchmark subsystem. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants