pub struct ResourceStats { /* private fields */ }Expand description
Statistics for an resource group.
Implementations§
Source§impl ResourceStats
impl ResourceStats
Sourcepub fn has_allocated(&self) -> bool
pub fn has_allocated(&self) -> bool
Returns true if the given group has allocated any memory at all.
Sourcepub fn snapshot_delta(
&self,
previous: &ResourceStatsSnapshot,
) -> ResourceStatsSnapshot
pub fn snapshot_delta( &self, previous: &ResourceStatsSnapshot, ) -> ResourceStatsSnapshot
Captures a snapshot of the current statistics based on the delta from a previous snapshot.
This can be used to keep a single local snapshot of the last delta, and then both track the delta since that snapshot, as well as update the snapshot to the current statistics.
Callers should generally create their snapshot via ResourceStatsSnapshot::empty and then use this method
to get their snapshot delta, utilize those delta values in whatever way is necessary, and then merge the
snapshot delta into the primary snapshot via ResourceStatsSnapshot::merge to make it current.
Auto Trait Implementations§
impl !Freeze for ResourceStats
impl RefUnwindSafe for ResourceStats
impl Send for ResourceStats
impl Sync for ResourceStats
impl Unpin for ResourceStats
impl UnsafeUnpin for ResourceStats
impl UnwindSafe for ResourceStats
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> 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::RequestSource§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self> ⓘ
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self> ⓘ
Instruments this type by attaching the given resource group token, returning a
Tracked wrapper. Read more