Skip to content

refactor(tests): Replace trait SubNetRouter with an enum, remove Mutex from EimAdfNat#679

Draft
matheus23 wants to merge 2 commits into
flub/proto-tests-real-natsfrom
matheus23/proto-tests-real-nats
Draft

refactor(tests): Replace trait SubNetRouter with an enum, remove Mutex from EimAdfNat#679
matheus23 wants to merge 2 commits into
flub/proto-tests-real-natsfrom
matheus23/proto-tests-real-nats

Conversation

@matheus23
Copy link
Copy Markdown
Member

Description

Happy to report I was able to just instruct Qwen3.6-36b-a3b locally and it produced the first commit. I reviewed it and fixed up one thing in the second commit.

Anyhow! This is a small refactor get rid of the Mutex in EimAdfNat. Not sure if it's worth doing, because it makes the call sites comparatively worse for .qad_addr().

Breaking Changes

Notes & open questions

Change checklist

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

@github-actions
Copy link
Copy Markdown

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

Last updated: 2026-05-29T14:21:19Z

@github-actions
Copy link
Copy Markdown

Performance Comparison Report

4f6da4f0c1797ebf9fdbb24245ad0450d70670ac - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5404.2 Mbps 7915.1 Mbps -31.7% 94.6% / 100.0%
medium-concurrent 5296.5 Mbps 7784.2 Mbps -32.0% 95.2% / 149.0%
medium-single 3816.7 Mbps 4749.5 Mbps -19.6% 95.2% / 151.0%
small-concurrent 3806.7 Mbps 5295.7 Mbps -28.1% 91.2% / 99.4%
small-single 3438.5 Mbps 4754.9 Mbps -27.7% 90.0% / 97.8%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3045.0 Mbps 3980.9 Mbps -23.5%
lan 782.4 Mbps 810.3 Mbps -3.4%
lossy 55.9 Mbps 69.8 Mbps -20.0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 27.4% slower on average

@flub
Copy link
Copy Markdown
Collaborator

flub commented May 29, 2026

Yeah, this occurred to me too. Didn't like it much. What I did think might be worth exploring is adding qad_addr() -> Option<SocketAddr> to the SubNetRouter trait instead. But not fully thought this through yet, busy refactoring other test stuff first...

@n0bot n0bot Bot added this to iroh May 29, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh May 29, 2026
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.

2 participants