pub struct Aggregator { /* private fields */ }Expand description
Windowed / session metric aggregator. One record in, snapshot out.
Implementations§
Source§impl Aggregator
impl Aggregator
Sourcepub fn record(&mut self, sample: Sample)
pub fn record(&mut self, sample: Sample)
The one ingest path. Every measurement in the system goes through here.
Sourcepub fn snapshot(&self, horizon: Horizon) -> Snapshot
pub fn snapshot(&self, horizon: Horizon) -> Snapshot
Aggregate one horizon into a snapshot. Series with no samples this horizon
are omitted (e.g. every series right after flush_window for Window).
Sourcepub fn flush_window(&mut self)
pub fn flush_window(&mut self)
Clear the window horizon — call after emitting a window snapshot. Reuses each reservoir’s backing capacity (no per-flush realloc).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Aggregator
impl RefUnwindSafe for Aggregator
impl Send for Aggregator
impl Sync for Aggregator
impl Unpin for Aggregator
impl UnsafeUnpin for Aggregator
impl UnwindSafe for Aggregator
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request