pub struct LatencyStats {
pub min_latency: u64,
pub max_latency: u64,
pub avg_latency: u64,
pub last_latency: u64,
pub measurement_count: u64,
pub variance: f64,
}
Expand description
Latency measurement statistics
Fieldsยง
ยงmin_latency: u64
Minimum recorded latency (nanoseconds)
max_latency: u64
Maximum recorded latency (nanoseconds)
avg_latency: u64
Average latency (nanoseconds)
last_latency: u64
Latest latency measurement
measurement_count: u64
Number of latency measurements
variance: f64
Latency variance
Implementationsยง
Sourceยงimpl LatencyStats
impl LatencyStats
pub fn new() -> Self
pub fn add_measurement(&mut self, latency: u64)
Trait Implementationsยง
Sourceยงimpl Clone for LatencyStats
impl Clone for LatencyStats
Sourceยงfn clone(&self) -> LatencyStats
fn clone(&self) -> LatencyStats
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSourceยงimpl Debug for LatencyStats
impl Debug for LatencyStats
Sourceยงimpl<'de> Deserialize<'de> for LatencyStats
impl<'de> Deserialize<'de> for LatencyStats
Sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementationsยง
impl Freeze for LatencyStats
impl RefUnwindSafe for LatencyStats
impl Send for LatencyStats
impl Sync for LatencyStats
impl Unpin for LatencyStats
impl UnwindSafe for LatencyStats
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more