#[non_exhaustive]pub struct PoolMetrics {
pub thread_limit: usize,
pub threads: usize,
pub active_tasks: usize,
pub queue_depth: usize,
pub tasks: u64,
pub wait_duration: Duration,
pub busy_duration: Duration,
}Expand description
Snapshot of ThreadPool metrics.
Durations and task counts are totals since the pool was created. Rates
and averages over an interval are computed from the deltas of two
snapshots, e.g. the average queue wait is the wait_duration delta
divided by the tasks delta.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.thread_limit: usizeMaximum number of worker threads.
threads: usizeNumber of worker threads, busy or idle.
active_tasks: usizeNumber of tasks being executed.
queue_depth: usizeNumber of tasks waiting for a worker thread.
tasks: u64Number of tasks started.
wait_duration: DurationTotal time started tasks waited for a worker thread.
busy_duration: DurationTotal time worker threads spent executing tasks.
Trait Implementations§
Source§impl Clone for PoolMetrics
impl Clone for PoolMetrics
impl Copy for PoolMetrics
Source§impl Debug for PoolMetrics
impl Debug for PoolMetrics
Source§impl Default for PoolMetrics
impl Default for PoolMetrics
impl Eq for PoolMetrics
Source§impl PartialEq for PoolMetrics
impl PartialEq for PoolMetrics
impl StructuralPartialEq for PoolMetrics
Auto Trait Implementations§
impl Freeze for PoolMetrics
impl RefUnwindSafe for PoolMetrics
impl Send for PoolMetrics
impl Sync for PoolMetrics
impl Unpin for PoolMetrics
impl UnsafeUnpin for PoolMetrics
impl UnwindSafe for PoolMetrics
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