pub struct ThreadPoolStats {
pub lifecycle: ExecutorServiceLifecycle,
pub core_pool_size: usize,
pub maximum_pool_size: usize,
pub live_workers: usize,
pub idle_workers: usize,
pub queued_tasks: usize,
pub running_tasks: usize,
pub submitted_tasks: usize,
pub completed_tasks: usize,
pub cancelled_tasks: usize,
pub terminated: bool,
}Expand description
Point-in-time counters reported by crate::ThreadPool.
The snapshot is intended for monitoring and tests. It is not a stable synchronization primitive; concurrent submissions and completions may make the next snapshot different immediately after this one is returned.
Fields§
§lifecycle: ExecutorServiceLifecycleObserved lifecycle state.
core_pool_size: usizeConfigured core pool size.
maximum_pool_size: usizeConfigured maximum pool size.
live_workers: usizeNumber of live worker loops.
idle_workers: usizeNumber of workers currently waiting for work.
queued_tasks: usizeNumber of queued tasks waiting for a worker.
running_tasks: usizeNumber of tasks currently held by workers.
submitted_tasks: usizeNumber of tasks accepted since pool creation.
completed_tasks: usizeNumber of accepted jobs completed or otherwise made inactive without queued cancellation.
cancelled_tasks: usizeNumber of queued jobs cancelled by immediate shutdown.
terminated: boolWhether the pool has fully terminated.
Trait Implementations§
Source§impl Clone for ThreadPoolStats
impl Clone for ThreadPoolStats
Source§fn clone(&self) -> ThreadPoolStats
fn clone(&self) -> ThreadPoolStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ThreadPoolStats
impl Debug for ThreadPoolStats
Source§impl Default for ThreadPoolStats
impl Default for ThreadPoolStats
Source§impl PartialEq for ThreadPoolStats
impl PartialEq for ThreadPoolStats
Source§fn eq(&self, other: &ThreadPoolStats) -> bool
fn eq(&self, other: &ThreadPoolStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ThreadPoolStats
impl Eq for ThreadPoolStats
impl StructuralPartialEq for ThreadPoolStats
Auto Trait Implementations§
impl Freeze for ThreadPoolStats
impl RefUnwindSafe for ThreadPoolStats
impl Send for ThreadPoolStats
impl Sync for ThreadPoolStats
impl Unpin for ThreadPoolStats
impl UnsafeUnpin for ThreadPoolStats
impl UnwindSafe for ThreadPoolStats
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