pub struct PerformanceMetrics { /* private fields */ }Expand description
Performance metrics for taskflow execution
Implementations§
Source§impl PerformanceMetrics
impl PerformanceMetrics
Sourcepub fn record_task_completion(&self, duration: Duration)
pub fn record_task_completion(&self, duration: Duration)
Record task completion
Sourcepub fn record_task_steal(&self)
pub fn record_task_steal(&self)
Record task steal
Sourcepub fn record_task_failure(&self)
pub fn record_task_failure(&self)
Record task failure
Sourcepub fn record_worker_idle(&self, worker_id: usize, duration: Duration)
pub fn record_worker_idle(&self, worker_id: usize, duration: Duration)
Record worker idle time
Sourcepub fn record_worker_busy(&self, worker_id: usize, duration: Duration)
pub fn record_worker_busy(&self, worker_id: usize, duration: Duration)
Record worker busy time
Sourcepub fn tasks_completed(&self) -> usize
pub fn tasks_completed(&self) -> usize
Get total tasks completed
Sourcepub fn tasks_stolen(&self) -> usize
pub fn tasks_stolen(&self) -> usize
Get total tasks stolen
Sourcepub fn tasks_failed(&self) -> usize
pub fn tasks_failed(&self) -> usize
Get total tasks failed
Sourcepub fn total_execution_time(&self) -> Duration
pub fn total_execution_time(&self) -> Duration
Get total execution time
Sourcepub fn average_task_duration(&self) -> Duration
pub fn average_task_duration(&self) -> Duration
Get average task duration
Sourcepub fn tasks_per_second(&self) -> f64
pub fn tasks_per_second(&self) -> f64
Get tasks per second
Sourcepub fn worker_utilization(&self, worker_id: usize) -> f64
pub fn worker_utilization(&self, worker_id: usize) -> f64
Get worker utilization (percentage busy)
Sourcepub fn average_worker_utilization(&self) -> f64
pub fn average_worker_utilization(&self) -> f64
Get average worker utilization
Sourcepub fn steal_rate(&self) -> f64
pub fn steal_rate(&self) -> f64
Get steal rate (percentage of tasks stolen)
Trait Implementations§
Source§impl Clone for PerformanceMetrics
impl Clone for PerformanceMetrics
Source§fn clone(&self) -> PerformanceMetrics
fn clone(&self) -> PerformanceMetrics
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 PerformanceMetrics
impl RefUnwindSafe for PerformanceMetrics
impl Send for PerformanceMetrics
impl Sync for PerformanceMetrics
impl Unpin for PerformanceMetrics
impl UnsafeUnpin for PerformanceMetrics
impl UnwindSafe for PerformanceMetrics
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