Skip to content

Show the per-path latency the daemon already measures - #45

Merged
myobie merged 1 commit into
mainfrom
feat/show-path-latency
Aug 4, 2026
Merged

Show the per-path latency the daemon already measures#45
myobie merged 1 commit into
mainfrom
feat/show-path-latency

Conversation

@myobie

@myobie myobie commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Approved by cos. The daemon has measured a round trip and a path class on every liveness probe since the connection telemetry landed, and the only way to read it was to parse telemetry.json by hand — the exact grepping those counters exist to end. I built the collection in #36 and never built the display.

What it looks like, on the live mesh

paths
  droppy	reachable 252/252
    relay 	78%	n=196	mean=83.0ms	max=316.0ms
    direct	22%	n=56	mean=84.7ms	max=680.8ms
  hetz	reachable 252/252
    direct	99%	n=250	mean=64.8ms	max=335.3ms
    relay 	1%	n=2	mean=74.6ms	max=76.6ms

The roaming signature is now legible at a glance. hetz holds a direct path 99% of the time at 64.8ms — a stable address. droppy sits on the relay 78% of the time, and when it does get a direct path that path is no better on average and more than twice as bad at the tail. That matches the three-day percentiles measured earlier and the path-quality gap cos has carried since 15 July.

Busiest path first, because which path a peer spends its time on is usually the finding.

A peer is listed on probe evidence alone

The sessions block is keyed off losses, so a peer that has never dropped prints nothing there. Healthy is the normal state, so keying this block the same way would have blanked exactly the peers an operator looks at most and hidden the path evidence on all of them. cos flagged this specifically; a test covers the healthy peer.

Mean and max are exact, percentiles deliberately absent

This first rendered p50/p90 from the histogram. On live data direct and relay both printed while their means differed and their maxima differed by more than 2x — the bucket bounds double, so both distributions fell in one bucket.

The display hid the difference it exists to show. A number that does that is worse than none, so it now reports the exact stored mean and max. A test pins those and asserts the percentiles stay out, using samples whose mean falls in a bucket neither sample occupies — so a bucketed statistic could not produce it.

Scope

Facts only, no verdict. Nothing labels a path degraded and nothing changes routing. No classifier, no demotion — a classifier with no consumer is speculative, and the actuator is deferred.

Needs no host, no restart, no environment change, and no decision from Nathan, so it can land while the pathwatch question waits.

Tests

201 lib + 12 bin green (5 new), plus lifecycle and provisioning. main.rs passes rustfmt.

The daemon has measured a round trip and a path class on every liveness probe
since the connection telemetry landed, and there was no way to read any of it
without parsing telemetry.json by hand. That is the exact grepping these
counters exist to end. I built the collection and never built the display.

fabric status now reports, per peer and per path, the share of probes, the
sample count, and the exact mean and maximum. Busiest path first, because which
path a peer spends its time on is usually the finding.

On the live mesh this makes the roaming signature readable at a glance. hetz
holds a direct path 99 percent of the time at 64.8 ms. droppy sits on the relay
78 percent of the time, and its direct path is no better on average and more
than twice as bad at the tail, 680.8 ms against 316.0 ms.

A PEER IS LISTED ON PROBE EVIDENCE ALONE. The sessions block is keyed off
losses, so a peer that has never dropped prints nothing there. Healthy is the
normal state, so keying this block the same way would have blanked exactly the
peers an operator looks at most and hidden the path evidence on all of them. A
test covers the healthy peer specifically.

MEAN AND MAX ARE EXACT, AND PERCENTILES ARE DELIBERATELY ABSENT. This first
rendered p50 and p90 from the histogram. On live data direct and relay both
printed p50 100.0 ms and p90 200.0 ms while their means differed and their
maxima differed by more than twice, because the bucket bounds double and both
distributions landed in one bucket. The display hid the difference it exists to
show. A test pins the exact values and asserts the percentiles stay out.

This reports facts and reaches no verdict. Nothing labels a path degraded and
nothing changes routing. No classifier, no demotion.

201 lib and 12 bin tests green, 5 new.
@myobie
myobie merged commit 72e2d67 into main Aug 4, 2026
2 checks passed
@myobie
myobie deleted the feat/show-path-latency branch August 4, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant