pub struct RoundStats {
pub duration: Duration,
pub rmr: f32,
pub ldh: f32,
pub missed: f32,
}
Available on crate feature
test-utils
only.Expand description
Statistics for a gossip round.
Fields§
§duration: Duration
The (simulated) time this round took in total.
rmr: f32
The relative message redundancy in this round.
ldh: f32
The maximum last delivery hop in this round.
missed: f32
The number of undelivered messages in this round.
Implementations§
Source§impl RoundStats
impl RoundStats
Sourcepub fn mean<'a>(rounds: impl IntoIterator<Item = &'a RoundStats>) -> RoundStats
pub fn mean<'a>(rounds: impl IntoIterator<Item = &'a RoundStats>) -> RoundStats
Calculates the mean for each value in a list of RoundStats
.
Sourcepub fn min<'a>(rounds: impl IntoIterator<Item = &'a RoundStats>) -> RoundStats
pub fn min<'a>(rounds: impl IntoIterator<Item = &'a RoundStats>) -> RoundStats
Calculates the minimum for each value in a list of RoundStats
.
Sourcepub fn max<'a>(rounds: impl IntoIterator<Item = &'a RoundStats>) -> RoundStats
pub fn max<'a>(rounds: impl IntoIterator<Item = &'a RoundStats>) -> RoundStats
Calculates the maximum for each value in a list of RoundStats
.
Sourcepub fn avg(rounds: &[RoundStats]) -> RoundStatsAvg
pub fn avg(rounds: &[RoundStats]) -> RoundStatsAvg
Calculates the minimum, maximum, and mean for each value in a list of RoundStats
.
Sourcepub fn diff(&self, other: &Self) -> RoundStatsDiff
pub fn diff(&self, other: &Self) -> RoundStatsDiff
Calculates the difference factors for each value between self
and other
.
Trait Implementations§
Source§impl Clone for RoundStats
impl Clone for RoundStats
Source§fn clone(&self) -> RoundStats
fn clone(&self) -> RoundStats
Returns a copy 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 RoundStats
impl Debug for RoundStats
Source§impl Default for RoundStats
impl Default for RoundStats
Source§fn default() -> RoundStats
fn default() -> RoundStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RoundStats
impl<'de> Deserialize<'de> for RoundStats
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
Source§impl Display for RoundStats
impl Display for RoundStats
Auto Trait Implementations§
impl Freeze for RoundStats
impl RefUnwindSafe for RoundStats
impl Send for RoundStats
impl Sync for RoundStats
impl Unpin for RoundStats
impl UnwindSafe for RoundStats
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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