pub struct CacheMetrics { /* private fields */ }Expand description
Handles for the cache and registry gauges. Cloning shares the storage.
Implementations§
Source§impl CacheMetrics
impl CacheMetrics
Sourcepub fn record_eviction(&self, reason: EvictionReason)
pub fn record_eviction(&self, reason: EvictionReason)
Count one evicted model against the rule that selected it.
Sourcepub fn set_registry_entries(
&self,
downloading: i64,
downloaded: i64,
errored: i64,
)
pub fn set_registry_entries( &self, downloading: i64, downloaded: i64, errored: i64, )
Publish the registry entry counts observed by a refresh pass.
Sourcepub fn set_state_entries(&self, map: &'static str, count: i64)
pub fn set_state_entries(&self, map: &'static str, count: i64)
Publish the size of an in-process map.
Sourcepub fn stamp_task_success(&self, task: &'static str, unix_seconds: i64)
pub fn stamp_task_success(&self, task: &'static str, unix_seconds: i64)
Stamp a task’s last successful run.
Only on success. A task that starts failing leaves its previous timestamp
in place and the value goes stale, which is what makes
time() - mx_task_last_success_timestamp_seconds a usable liveness alert;
stamping unconditionally would report a wedged task as healthy.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CacheMetrics
impl !UnwindSafe for CacheMetrics
impl Forget for CacheMetrics
impl Freeze for CacheMetrics
impl Move for CacheMetrics
impl Send for CacheMetrics
impl Sync for CacheMetrics
impl Unpin for CacheMetrics
impl UnsafeUnpin for CacheMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§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::RequestSource§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