#[non_exhaustive]pub struct PoolMetrics {
pub thread_limit: usize,
pub threads: usize,
pub active_tasks: usize,
pub queue_depth: usize,
pub max_queue_depth: usize,
pub saturated_tasks: u64,
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.
System::pool_metrics combines the pools
of all arbiters: gauges, limits, and totals are summed and
max_queue_depth is the highest of any single pool.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
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.
max_queue_depth: usizeHighest number of tasks waiting for a worker thread at once.
saturated_tasks: u64Number of tasks queued while the pool was at its thread limit.
A growing value means the pool has too few worker threads for its load.
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
Source§fn clone(&self) -> PoolMetrics
fn clone(&self) -> PoolMetrics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PoolMetrics
Source§impl Debug for PoolMetrics
impl Debug for PoolMetrics
Source§impl Default for PoolMetrics
impl Default for PoolMetrics
Source§fn default() -> PoolMetrics
fn default() -> 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.