mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-01-02 13:23:13 +00:00
Log DA balancer stats on readiness timeout
This commit is contained in:
parent
ba0f87124d
commit
77026378e1
@ -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::<Vec<_>>()
|
||||
.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::<Vec<_>>()
|
||||
.join(";")
|
||||
}
|
||||
|
||||
fn build_timeout_summary(
|
||||
labels: &[String],
|
||||
infos: Vec<Libp2pInfo>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user