pub struct ExtSchedulerStats {
pub tasks_created: u64,
pub tasks_completed: u64,
pub tasks_cancelled: u64,
pub tasks_stolen: u64,
pub idle_samples: u64,
pub busy_samples: u64,
pub total_latency_ticks: u64,
pub max_latency_ticks: u64,
pub latency_violations: u64,
pub latency_threshold_ticks: u64,
}Expand description
Extended scheduler statistics.
Fields§
§tasks_created: u64Total tasks created.
tasks_completed: u64Total tasks completed.
tasks_cancelled: u64Total tasks cancelled.
tasks_stolen: u64Total tasks stolen from other workers.
idle_samples: u64Total worker-idle samples.
busy_samples: u64Total worker-busy samples.
total_latency_ticks: u64Cumulative task latency in “ticks”.
max_latency_ticks: u64Maximum observed task latency.
latency_violations: u64Total tasks exceeding latency threshold.
latency_threshold_ticks: u64Latency violation threshold.
Implementations§
Source§impl ExtSchedulerStats
impl ExtSchedulerStats
Sourcepub fn record_created(&mut self)
pub fn record_created(&mut self)
Record task creation.
Sourcepub fn record_completed(&mut self, latency_ticks: u64)
pub fn record_completed(&mut self, latency_ticks: u64)
Record task completion with latency.
Sourcepub fn record_cancelled(&mut self)
pub fn record_cancelled(&mut self)
Record a task cancellation.
Sourcepub fn record_steal(&mut self)
pub fn record_steal(&mut self)
Record a work-steal event.
Sourcepub fn record_sample(&mut self, busy: bool)
pub fn record_sample(&mut self, busy: bool)
Record worker state samples.
Sourcepub fn utilization(&self) -> f64
pub fn utilization(&self) -> f64
Worker utilization (0.0 – 1.0).
Sourcepub fn avg_latency(&self) -> f64
pub fn avg_latency(&self) -> f64
Average latency in ticks.
Sourcepub fn merge(&mut self, other: &ExtSchedulerStats)
pub fn merge(&mut self, other: &ExtSchedulerStats)
Merge with another stats instance.
Trait Implementations§
Source§impl Clone for ExtSchedulerStats
impl Clone for ExtSchedulerStats
Source§fn clone(&self) -> ExtSchedulerStats
fn clone(&self) -> ExtSchedulerStats
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 moreSource§impl Debug for ExtSchedulerStats
impl Debug for ExtSchedulerStats
Source§impl Default for ExtSchedulerStats
impl Default for ExtSchedulerStats
Source§fn default() -> ExtSchedulerStats
fn default() -> ExtSchedulerStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExtSchedulerStats
impl RefUnwindSafe for ExtSchedulerStats
impl Send for ExtSchedulerStats
impl Sync for ExtSchedulerStats
impl Unpin for ExtSchedulerStats
impl UnsafeUnpin for ExtSchedulerStats
impl UnwindSafe for ExtSchedulerStats
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