Add metrics for prune messages (#1981)
This commit is contained in:
parent
70312ed77f
commit
b21facab7b
|
@ -17,6 +17,7 @@ use bloom::Bloom;
|
|||
use contact_info::ContactInfo;
|
||||
use counter::Counter;
|
||||
use crds_gossip::CrdsGossip;
|
||||
use crds_gossip_error::CrdsGossipError;
|
||||
use crds_gossip_pull::CRDS_GOSSIP_PULL_CRDS_TIMEOUT_MS;
|
||||
use crds_value::{CrdsValue, CrdsValueLabel, LeaderId};
|
||||
use ledger::LedgerWindow;
|
||||
|
@ -898,16 +899,22 @@ impl ClusterInfo {
|
|||
if data.verify() {
|
||||
inc_new_counter_info!("cluster_info-prune_message", 1);
|
||||
inc_new_counter_info!("cluster_info-prune_message-size", data.prunes.len());
|
||||
me.write()
|
||||
.unwrap()
|
||||
.gossip
|
||||
.process_prune_msg(
|
||||
from,
|
||||
data.destination,
|
||||
&data.prunes,
|
||||
data.wallclock,
|
||||
timestamp(),
|
||||
).ok();
|
||||
match me.write().unwrap().gossip.process_prune_msg(
|
||||
from,
|
||||
data.destination,
|
||||
&data.prunes,
|
||||
data.wallclock,
|
||||
timestamp(),
|
||||
) {
|
||||
Err(CrdsGossipError::PruneMessageTimeout) => {
|
||||
inc_new_counter_info!("cluster_info-prune_message_timeout", 1)
|
||||
}
|
||||
Err(CrdsGossipError::BadPruneDestination) => {
|
||||
inc_new_counter_info!("cluster_info-bad_prune_destination", 1)
|
||||
}
|
||||
Err(_) => (),
|
||||
Ok(_) => (),
|
||||
}
|
||||
}
|
||||
vec![]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue