pub struct AdvancedThreadPoolStats {
pub total_tasks_executed: u64,
pub total_execution_time: Duration,
pub work_steals: u64,
pub load_balance_efficiency: f64,
pub worker_stats: Vec<WorkerStats>,
pub queue_contention: f64,
}Expand description
Advanced statistics for the thread pool
Fields§
§total_tasks_executed: u64Total tasks executed across all workers
total_execution_time: DurationTotal execution time
work_steals: u64Number of work steals performed
load_balance_efficiency: f64Load balancing efficiency (0.0 to 1.0)
worker_stats: Vec<WorkerStats>Per-worker statistics
queue_contention: f64Queue contention metrics
Implementations§
Source§impl AdvancedThreadPoolStats
impl AdvancedThreadPoolStats
Sourcepub fn throughput(&self) -> f64
pub fn throughput(&self) -> f64
Calculate throughput (tasks per second)
Sourcepub fn average_latency(&self) -> Duration
pub fn average_latency(&self) -> Duration
Calculate average task latency
Sourcepub fn worker_utilization(&self) -> Vec<f64>
pub fn worker_utilization(&self) -> Vec<f64>
Calculate worker utilization
Sourcepub fn calculate_load_balance_efficiency(&self) -> f64
pub fn calculate_load_balance_efficiency(&self) -> f64
Calculate load balance efficiency
Trait Implementations§
Source§impl Clone for AdvancedThreadPoolStats
impl Clone for AdvancedThreadPoolStats
Source§fn clone(&self) -> AdvancedThreadPoolStats
fn clone(&self) -> AdvancedThreadPoolStats
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for AdvancedThreadPoolStats
impl RefUnwindSafe for AdvancedThreadPoolStats
impl Send for AdvancedThreadPoolStats
impl Sync for AdvancedThreadPoolStats
impl Unpin for AdvancedThreadPoolStats
impl UnsafeUnpin for AdvancedThreadPoolStats
impl UnwindSafe for AdvancedThreadPoolStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more