Skip to content

feat: Only wait for the start of the draining period in Endpoint::wait_idle#651

Draft
matheus23 wants to merge 2 commits into
mainfrom
matheus23/wait-for-draining
Draft

feat: Only wait for the start of the draining period in Endpoint::wait_idle#651
matheus23 wants to merge 2 commits into
mainfrom
matheus23/wait-for-draining

Conversation

@matheus23
Copy link
Copy Markdown
Member

@matheus23 matheus23 commented May 13, 2026

Description

Only wait for the start of the draining period in Endpoint::wait_idle instead of waiting for draining to have finished.

This allows dropping the Endpoint once all connections became inactive and there is no need to wait for all connections to have drained.

Also adds Endpoint::wait_drained which now has the same behavior as Endpoint::wait_idle has had before. This is needed in two tests that want to wait for connections being dropped.

Breaking Changes

  • behavioral: Endpoint::wait_idle now only waits for connections to become inactive (for them to start the draining period), instead of waiting for them to stop the draining period.

Notes & open questions

Draft for now until this has tests & the docs are adjusted.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

…it_idle`

Instead of waiting for draining to have finished.

This allows dropping the `Endpoint` once all connections became inactive and there is no need to wait for all connections to have drained.
@matheus23 matheus23 self-assigned this May 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/651/docs/noq/

Last updated: 2026-05-13T17:16:35Z

@n0bot n0bot Bot added this to iroh May 13, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh May 13, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Performance Comparison Report

e09e838a5bce459d072dddc6aa6bd42f188679a4 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5404.5 Mbps 7985.5 Mbps -32.3% 97.1% / 146.0%
medium-concurrent 5535.1 Mbps 7822.1 Mbps -29.2% 91.8% / 97.0%
medium-single 3831.3 Mbps 4625.2 Mbps -17.2% 92.1% / 100.0%
small-concurrent 3839.5 Mbps 5240.7 Mbps -26.7% 95.6% / 102.0%
small-single 3567.2 Mbps 4876.3 Mbps -26.8% 95.4% / 151.0%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3081.2 Mbps N/A N/A
lan 782.4 Mbps N/A N/A
lossy 69.8 Mbps N/A N/A
wan 83.8 Mbps N/A N/A

Summary

noq is 27.4% slower on average

---
188306b6a7260d8233bdb81b75592bf53b2f9933 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5242.0 Mbps 8051.1 Mbps -34.9% 95.4% / 99.5%
medium-concurrent 5450.4 Mbps 7718.4 Mbps -29.4% 96.7% / 149.0%
medium-single 3833.3 Mbps 4749.4 Mbps -19.3% 97.2% / 149.0%
small-concurrent 3926.8 Mbps 5209.8 Mbps -24.6% 93.6% / 102.0%
small-single 3568.0 Mbps 4848.3 Mbps -26.4% 92.9% / 102.0%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3063.8 Mbps 3977.7 Mbps -23.0%
lan 782.4 Mbps 802.3 Mbps -2.5%
lossy 69.9 Mbps 69.9 Mbps ~0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 26.7% slower on average

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

Labels

None yet

Projects

Status: 🚑 Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant