Compress contact_info_trace() output to improve CI log rendering (#6852)

This commit is contained in:
Michael Vines
2019-11-09 01:12:18 -07:00
committed by GitHub
parent 0fbd508c5f
commit 1ddf90ed08

View File

@ -267,11 +267,10 @@ impl ClusterInfo {
} }
let ip_addr = node.gossip.ip(); let ip_addr = node.gossip.ip();
format!( 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(), 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), now.saturating_sub(last_updated),
node.id.to_string(), node.id.to_string(),
addr_to_string(&ip_addr, &node.gossip), addr_to_string(&ip_addr, &node.gossip),
@ -288,10 +287,10 @@ impl ClusterInfo {
.collect(); .collect();
format!( format!(
" IP Address | Age | Node identifier \ "IP Address |Age(ms)| Node identifier \
|Gossip| TPU |TPU fwd| TVU |TVU fwd|Repair|Storage| RPC |PubSub\n\ |Gossip| TPU |TPU fwd| TVU |TVU fwd|Repair|Storage| RPC |PubSub\n\
--------------------+---------+-----------------------------------------------+\ ------------------+-------+----------------------------------------------+\
-------+-------+-------+-------+-------+-------+-------+-------+-------\n\ ------+------+-------+------+-------+------+-------+------+------\n\
{}\ {}\
Nodes: {}{}{}", Nodes: {}{}{}",
nodes.join(""), nodes.join(""),