-
Notifications
You must be signed in to change notification settings - Fork 302
feat: congestion metrics #3491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: congestion metrics #3491
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3491/docs/iroh/ Last updated: 2025-10-07T18:23:25Z |
9e23616
to
a89e698
Compare
conflicts |
iroh/src/magicsock/metrics.rs
Outdated
path_failure_resets: Counter::default(), | ||
path_packet_loss_rate: packet_loss_buckets(), | ||
path_rtt_variance_ms: rtt_variance_buckets(), | ||
path_quality_score: quality_score_buckets(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not blocking) it's a bit sad we have to do this manually when including histograms now :( I wonder if we could adjust our macro or sth
cc @Frando
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking for some magic syntax sugar with a default annotation or sth but couldn't work it out.
The problem is for each histogram you want to provide a specific set of buckets that make sense for that metric specifically, so you need to "adjust" it here. However if there was some magic #[default...] annotation I couldn't find where I pass in those funcs, it would be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add such an annotation to the macro. Can do tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the macro: n0-computer/iroh-metrics#37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing really against it if it helps somewhere. But be aware that so much of this will disappear soon. E.g. I just deleted the entire path_validity module in the feat-multipath
branch.
I'm expecting to not try and merge any of the metrics changes into there and instead we'll have to give it a separate metrics review to get back at least what may still be relevant once it's merged.
iroh/src/magicsock/metrics.rs
Outdated
} | ||
|
||
fn packet_loss_buckets() -> Histogram { | ||
Histogram::new(vec![0.0, 0.01, 0.05, 0.1, 0.2, 0.5, 1.0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the buckets are:
- [0, 0.01)
- [0.01, 0.05)
- [0.1, 0.2)
- [0.2, 0.5)
- [0.5, 1.0)
- [1.0, infinity]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
I think that's fine, this is mostly a short term exploration of the space. |
a89e698
to
bf1548c
Compare
Currently failing because of the dependency on n0-computer/net-tools#36 |
Description
Needs n0-computer/iroh-metrics#35 and updating the Cargo.toml's again.
Breaking Changes
Notes & open questions
Change checklist
quic-rpc
iroh-gossip
iroh-blobs
dumbpipe
sendme