From 1ddf90ed08c111b260f99678984bcad3cb125fd4 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sat, 9 Nov 2019 01:12:18 -0700 Subject: [PATCH] Compress contact_info_trace() output to improve CI log rendering (#6852) --- core/src/cluster_info.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/src/cluster_info.rs b/core/src/cluster_info.rs index f294d5781..d11b80815 100644 --- a/core/src/cluster_info.rs +++ b/core/src/cluster_info.rs @@ -267,11 +267,10 @@ impl ClusterInfo { } let ip_addr = node.gossip.ip(); - format!( - "{:15} {:4}| {:5}ms | {:45} | {:5} | {:5} | {:5} | {:5} | {:5} | {:5} | {:5} | {:5} | {:5}\n", + "{:15} {:2}| {:5} | {:44} | {:5}| {:5}| {:5} | {:5}| {:5} | {:5}| {:5} | {:5}| {:5}\n", ip_addr.to_string(), - if node.id == my_pubkey { "(me)" } else { "" }.to_string(), + if node.id == my_pubkey { "me" } else { "" }.to_string(), now.saturating_sub(last_updated), node.id.to_string(), addr_to_string(&ip_addr, &node.gossip), @@ -288,10 +287,10 @@ impl ClusterInfo { .collect(); format!( - " IP Address | Age | Node identifier \ - | Gossip| TPU |TPU fwd| TVU |TVU fwd|Repair |Storage| RPC | PubSub\n\ - --------------------+---------+-----------------------------------------------+\ - -------+-------+-------+-------+-------+-------+-------+-------+-------\n\ + "IP Address |Age(ms)| Node identifier \ + |Gossip| TPU |TPU fwd| TVU |TVU fwd|Repair|Storage| RPC |PubSub\n\ + ------------------+-------+----------------------------------------------+\ + ------+------+-------+------+-------+------+-------+------+------\n\ {}\ Nodes: {}{}{}", nodes.join(""),