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

nodejs-github-bot commented May 15, 2026

@jasnell jasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label May 15, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels May 17, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/63314
βœ”  Done loading data for nodejs/node/pull/63314
----------------------------------- PR info ------------------------------------
Title      benchmark: respect stream/iter broadcast backpressure (#63314)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     trivikr:stream-iter-throughput-broadcast -> nodejs:main
Labels     stream, benchmark, author ready
Commits    1
 - benchmark: respect stream/iter broadcast backpressure
Committers 1
 - Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/63314
Reviewed-By: James M Snell <jasnell@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/63314
Reviewed-By: James M Snell <jasnell@gmail.com>
--------------------------------------------------------------------------------
   β„Ή  This PR was created on Fri, 15 May 2026 01:05:45 GMT
   βœ”  Approvals: 1
   βœ”  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/63314#pullrequestreview-4298652803
   ✘  This PR needs to wait 120 more hours to land (or 0 minutes if there is one more approval)
   βœ”  Last GitHub CI successful
   β„Ή  Green GitHub CI is sufficient
--------------------------------------------------------------------------------
   βœ”  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/25977767540

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. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants