pub struct PeakEWMA {
pub decay: f64,
pub rtt: f64,
pub last_event: Instant,
}
Expand description
exponentially weighted moving average with high sensibility to latency bursts
cf Finagle for the original implementation: https://github.com/twitter/finagle/blob/9cc08d15216497bb03a1cafda96b7266cfbbcff1/finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/PeakEwma.scala
Fields§
§decay: f64
decay in nanoseconds
higher values will make the EWMA decay slowly to 0
rtt: f64
estimated RTT in nanoseconds
must be set to a high enough default value so that new backends do not get all the traffic right away
last_event: Instant
last modification
Implementations§
Trait Implementations§
source§impl PartialEq for PeakEWMA
impl PartialEq for PeakEWMA
impl StructuralPartialEq for PeakEWMA
Auto Trait Implementations§
impl Freeze for PeakEWMA
impl RefUnwindSafe for PeakEWMA
impl Send for PeakEWMA
impl Sync for PeakEWMA
impl Unpin for PeakEWMA
impl UnwindSafe for PeakEWMA
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§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