pub struct OveruseDetector { /* private fields */ }Expand description
Turns a filtered delay trend into a Usage, with hysteresis.
§Why the debounce
The trend crossing the threshold once means very little — the filter is still noisy, and a
single video frame arriving late will do it. Overuse is only declared when the trend stays
outside and has not decreased since the last reading and at least two readings agree.
Upstream does the same (overuse_detector.go); it is what stops the estimate sawtoothing.
Coming back has no such delay: Normal and Under are declared immediately, because being
slow to notice that a path has recovered wastes capacity for as long as it takes to notice.
Implementations§
Source§impl OveruseDetector
impl OveruseDetector
Sourcepub fn threshold_ms(&self) -> f64
pub fn threshold_ms(&self) -> f64
The threshold the trend is being compared against, in milliseconds.
Trait Implementations§
Source§impl Clone for OveruseDetector
impl Clone for OveruseDetector
Source§fn clone(&self) -> OveruseDetector
fn clone(&self) -> OveruseDetector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OveruseDetector
Source§impl Debug for OveruseDetector
impl Debug for OveruseDetector
Auto Trait Implementations§
impl Freeze for OveruseDetector
impl RefUnwindSafe for OveruseDetector
impl Send for OveruseDetector
impl Sync for OveruseDetector
impl Unpin for OveruseDetector
impl UnsafeUnpin for OveruseDetector
impl UnwindSafe for OveruseDetector
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