Skip to main content

EdgeLinkObservable

Trait EdgeLinkObservable 

pub trait EdgeLinkObservable {
    // Required methods
    fn record(&mut self, measurement: Result<Duration, ()>);
    fn average_latency(&self) -> Option<Duration>;
    fn average_probe_rate(&self) -> f64;
    fn score(&self) -> f64;
}
Expand description

Trait for recording and querying transport-level link quality metrics for a transport link.

Required Methods§

fn record(&mut self, measurement: Result<Duration, ()>)

Records a new result of the probe over this path segment.

fn average_latency(&self) -> Option<Duration>

Returns average latency observed for the measured peer.

fn average_probe_rate(&self) -> f64

A value representing the average success rate of probes.

It is from the range [0.0, 1.0]. The higher the value, the better the score.

fn score(&self) -> f64

A value scoring the observed peer.

It is from the range [0.0, 1.0]. The higher the value, the better the score.

Implementors§