diff options
| author | tv <tv@krebsco.de> | 2026-10-30 18:11:57 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-30 18:11:57 +0100 |
| commit | 8b36be8bfaa88c59995ec275bc232b40e118502d (patch) | |
| tree | 86dd845fe9bebddf411799d5b8fac3f74bba3f60 /src/api/dashboard/mod.rs | |
| parent | d7825f533930a7b111ab74ef7cecf79dad908a55 (diff) | |
dashboard: show all links between peers
Diffstat (limited to 'src/api/dashboard/mod.rs')
| -rw-r--r-- | src/api/dashboard/mod.rs | 8 |
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() |
