pub(super) struct StatsManager {
stats: Stats,
previous_submit: Instant,
}
Expand description
Manage the Accounts Background Service stats
Used to record the stats and submit the datapoints.
Fields§
§stats: Stats
§previous_submit: Instant
Implementations§
source§impl StatsManager
impl StatsManager
sourcepub(super) fn record_and_maybe_submit(&mut self, runtime: Duration)
pub(super) fn record_and_maybe_submit(&mut self, runtime: Duration)
Record stats from this iteration, and maybe submit the datapoints based on how long it has been since the previous submission.
sourcefn maybe_submit(&mut self)
fn maybe_submit(&mut self)
Maybe submit the datapoints based on how long it has been since the previous submission.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for StatsManager
impl Send for StatsManager
impl Sync for StatsManager
impl Unpin for StatsManager
impl UnwindSafe for StatsManager
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