pub struct ServiceMetrics {
pub poll_count: u64,
pub total_busy_duration: Duration,
pub utilization: u8,
}
Expand description
Collected metrics of a single service.
Fields§
§poll_count: u64
Amount of times the service was polled.
total_busy_duration: Duration
Total amount of time the service was busy.
The busy duration starts at zero when the service is created and is increased whenever the service is spending time processing work. Using this value can indicate the load of the given service.
This number is monotonically increasing. It is never decremented or reset to zero.
utilization: u8
Approximate utilization of the service based on its Self::total_busy_duration
.
This value is a percentage in the range from [0-100]
and recomputed periodically.
The measure is only updated when the when the service is polled. A service which spends a long time idle may not have this measure updated for a long time.
Trait Implementations§
Source§impl Clone for ServiceMetrics
impl Clone for ServiceMetrics
Source§fn clone(&self) -> ServiceMetrics
fn clone(&self) -> ServiceMetrics
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ServiceMetrics
impl Debug for ServiceMetrics
impl Copy for ServiceMetrics
Auto Trait Implementations§
impl Freeze for ServiceMetrics
impl RefUnwindSafe for ServiceMetrics
impl Send for ServiceMetrics
impl Sync for ServiceMetrics
impl Unpin for ServiceMetrics
impl UnwindSafe for ServiceMetrics
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