Skip to main content

Metrics

Trait Metrics 

Source
pub trait Metrics: Send + Sync {
    // Required methods
    fn set(&self, key: &PublicKey, label: &str, val: usize);
    fn add(&self, key: &PublicKey, label: &str, val: usize);
    fn del(&self, key: &PublicKey);
}
Expand description

Type that records metrics.

Required Methods§

Source

fn set(&self, key: &PublicKey, label: &str, val: usize)

Set a peer gauge to the given value.

Source

fn add(&self, key: &PublicKey, label: &str, val: usize)

Add to a peer counter the given value.

Source

fn del(&self, key: &PublicKey)

Remove all peer metrics.

Implementors§