From 77026378e1d8d76bf33dd22fa6e12e5a5085515c Mon Sep 17 00:00:00 2001 From: andrussal Date: Fri, 5 Dec 2025 18:48:06 +0100 Subject: [PATCH] Log DA balancer stats on readiness timeout --- testing-framework/core/src/topology/mod.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/testing-framework/core/src/topology/mod.rs b/testing-framework/core/src/topology/mod.rs index 2bc8e08..14381f0 100644 --- a/testing-framework/core/src/topology/mod.rs +++ b/testing-framework/core/src/topology/mod.rs @@ -1216,7 +1216,8 @@ impl<'a> ReadinessCheck<'a> for DaBalancerReadiness<'a> { .into_iter() .map(|(label, threshold, stats)| { let connected = connected_subnetworks(&stats); - format!("{label}: connected={connected}, required={threshold}") + let details = format_balancer_stats(&stats); + format!("{label}: connected={connected}, required={threshold}, stats={details}") }) .collect::>() .join(", "); @@ -1235,6 +1236,17 @@ fn connected_subnetworks(stats: &BalancerStats) -> usize { .count() } +fn format_balancer_stats(stats: &BalancerStats) -> String { + if stats.is_empty() { + return "empty".into(); + } + stats + .iter() + .map(|(subnet, stat)| format!("{}:in={},out={}", subnet, stat.inbound, stat.outbound)) + .collect::>() + .join(";") +} + fn build_timeout_summary( labels: &[String], infos: Vec,