aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/dashboard/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-30 18:11:57 +0100
committertv <tv@krebsco.de>2026-10-30 18:11:57 +0100
commit46a7d204c81b002f960a9bca97941df7a98c43d4 (patch)
treedcf519abd3b5e48dd3c768648fc4d5dca03d6ce3 /src/api/dashboard/mod.rs
parentf65ecfdf313658a3979a2d0add53e342ce4b97df (diff)
dashboard: show all links between peers
Diffstat (limited to 'src/api/dashboard/mod.rs')
-rw-r--r--src/api/dashboard/mod.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/dashboard/mod.rs b/src/api/dashboard/mod.rs
index adaed10..6c7f1c5 100644
--- a/src/api/dashboard/mod.rs
+++ b/src/api/dashboard/mod.rs
@@ -35,9 +35,9 @@ use crate::transport::Link;
/// How often the snapshot is built and compared, while anyone looks.
const TICK: Duration = Duration::from_secs(2);
/// How often members are asked for their links, and the graph recomputed.
-const LINKS_EVERY: Duration = Duration::from_secs(30);
+const LINKS_EVERY: Duration = Duration::from_secs(10);
/// A member's links older than this are left out (it didn't answer since).
-const LINKS_KEPT_FOR: Duration = Duration::from_secs(90);
+const LINKS_KEPT_FOR: Duration = Duration::from_secs(30);
/// The producer runs on this long after the last request for the state.
const LINGER: Duration = Duration::from_secs(60);
/// Members asked for their links at most, each round.
@@ -230,6 +230,10 @@ fn links_json(links: &[Link]) -> JsonValue {
"relayed": link.relayed,
"rttMs": link.rtt_us.map(|us| f64::from(us) / 1000.0),
"dormant": link.dormant,
+ "others": link.others.iter().map(|other| json!({
+ "transport": other.transport,
+ "rttMs": other.rtt_us.map(|us| f64::from(us) / 1000.0),
+ })).collect::<Vec<_>>(),
})
})
.collect()