pub struct RunningAgg {
pub total_sum: f64,
pub total_count: u64,
pub window: VecDeque<f64>,
pub window_size: usize,
}Expand description
Running aggregate per relevancy metric. Holds both the all-time running mean and a bounded sliding window so progress views can show recent trend alongside the cumulative average.
Fields§
§total_sum: f64Sum of every score ever recorded (for all-time mean).
total_count: u64Count of scores recorded (for all-time mean).
window: VecDeque<f64>Recent scores, newest at the back. Capped at window_size.
window_size: usizeUpper bound on window length.
Implementations§
Source§impl RunningAgg
impl RunningAgg
Auto Trait Implementations§
impl Freeze for RunningAgg
impl RefUnwindSafe for RunningAgg
impl Send for RunningAgg
impl Sync for RunningAgg
impl Unpin for RunningAgg
impl UnsafeUnpin for RunningAgg
impl UnwindSafe for RunningAgg
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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