Skip to content

refactor(proto): Make state.rs handle emitting events instead of callers#753

Merged
matheus23 merged 1 commit into
mainfrom
matheus23/state-emit-refactor
Jul 16, 2026
Merged

refactor(proto): Make state.rs handle emitting events instead of callers#753
matheus23 merged 1 commit into
mainfrom
matheus23/state-emit-refactor

Conversation

@matheus23

Copy link
Copy Markdown
Member

Description

Follow-up from #748

  • Refactors how Draining and Drained endpoint events are emitted: They're now handled within state.rs.
  • move_to_draining and move_to_drained are now passed &mut self.endpoint_events.

This is a pure refactor without behavioral changes.

Breaking Changes

None

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

Last updated: 2026-07-16T13:52:41Z

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

Performance Comparison Report

f0fcdc825cb7582c108f4380bb5d1c44c9336835 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5375.0 Mbps 8099.5 Mbps -33.6% 99.4% / 152.0%
medium-concurrent 5427.7 Mbps 7800.1 Mbps -30.4% 93.1% / 101.0%
medium-single 3352.5 Mbps 4749.7 Mbps -29.4% 91.2% / 101.0%
small-concurrent 3796.7 Mbps 5255.3 Mbps -27.8% 98.1% / 155.0%
small-single 3430.7 Mbps 4836.1 Mbps -29.1% 94.8% / 102.0%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3049.9 Mbps 3923.3 Mbps -22.3%
lan 796.3 Mbps 810.4 Mbps -1.7%
lossy 69.9 Mbps 69.8 Mbps ~0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 28.8% slower on average

---
0503fedc00bba40800ef8d784d2cd80fc55291a1 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5641.4 Mbps 8185.4 Mbps -31.1% 97.1% / 98.7%
medium-concurrent 5454.1 Mbps 7849.7 Mbps -30.5% 96.8% / 98.3%
medium-single 4122.8 Mbps 4590.8 Mbps -10.2% 95.7% / 98.2%
small-concurrent 3795.5 Mbps 5223.6 Mbps -27.3% 97.1% / 99.6%
small-single 3423.1 Mbps 4696.7 Mbps -27.1% 96.3% / 98.6%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3080.8 Mbps N/A N/A
lan 782.4 Mbps N/A N/A
lossy 69.9 Mbps N/A N/A
wan 83.8 Mbps N/A N/A

Summary

noq is 26.5% slower on average

@n0bot n0bot Bot added this to iroh Jul 15, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh Jul 15, 2026
@matheus23 matheus23 added this to the noq: Sprint 0 milestone Jul 16, 2026

@flub flub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this followup!

Base automatically changed from matheus23/stateless-reset-and-draining to main July 16, 2026 12:43
@matheus23
matheus23 force-pushed the matheus23/state-emit-refactor branch from f0fcdc8 to 0503fed Compare July 16, 2026 13:49
@matheus23
matheus23 enabled auto-merge July 16, 2026 13:49
@matheus23
matheus23 added this pull request to the merge queue Jul 16, 2026
Merged via the queue into main with commit 22fbed2 Jul 16, 2026
39 checks passed
@matheus23
matheus23 deleted the matheus23/state-emit-refactor branch July 16, 2026 14:59
@github-project-automation github-project-automation Bot moved this from 🚑 Needs Triage to ✅ Done in iroh Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants