refactor(proto): Make state.rs handle emitting events instead of callers#753
Merged
Conversation
Merged
4 tasks
|
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 |
Performance Comparison Report
|
| 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
flub
approved these changes
Jul 16, 2026
flub
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for doing this followup!
matheus23
force-pushed
the
matheus23/state-emit-refactor
branch
from
July 16, 2026 13:49
f0fcdc8 to
0503fed
Compare
matheus23
enabled auto-merge
July 16, 2026 13:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up from #748
DrainingandDrainedendpoint events are emitted: They're now handled within state.rs.move_to_drainingandmove_to_drainedare now passed&mut self.endpoint_events.This is a pure refactor without behavioral changes.
Breaking Changes
None
Change checklist