pub struct Faults {
pub loss: f64,
pub duplicate: f64,
pub latency: Duration,
pub jitter: Duration,
}Expand description
What the link does to the traffic crossing it.
All zero by default: a link with no faults is a wire, and a test that wants one should not have to say so.
Fields§
§loss: f64Probability in 0.0..=1.0 that a datagram is dropped outright.
duplicate: f64Probability that a datagram is delivered twice.
Worth having as its own knob rather than folding into loss: a duplicate is what makes a receiver’s idempotence testable, and RFC 3261 §17 is largely about absorbing them.
latency: DurationThe base one-way delay.
jitter: DurationHow much the delay varies, uniformly, either side of latency.
This is also where reordering comes from, and deliberately so: packets do not overtake each other because a network chose to reorder them, they overtake because one took longer than another. A separate “reorder” probability would model the symptom instead of the cause, and would let a test see an ordering no real path could produce.
Implementations§
Trait Implementations§
impl Copy for Faults
Auto Trait Implementations§
impl Freeze for Faults
impl RefUnwindSafe for Faults
impl Send for Faults
impl Sync for Faults
impl Unpin for Faults
impl UnsafeUnpin for Faults
impl UnwindSafe for Faults
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more