#[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.