pub(crate) struct Stats {
batch: MetricsBatch,
processing_scheduled_tasks_started_at: Instant,
tasks_polled_in_batch: usize,
task_poll_time_ewma: f64,
}
Expand description
Per-worker statistics. This is used for both tuning the scheduler and reporting runtime-level metrics/stats.
Fields§
§batch: MetricsBatch
The metrics batch used to report runtime-level metrics/stats to the user.
processing_scheduled_tasks_started_at: Instant
Instant at which work last resumed (continued after park).
This duplicates the value stored in MetricsBatch
. We will unify
Stats
and MetricsBatch
when we stabilize metrics.
tasks_polled_in_batch: usize
Number of tasks polled in the batch of scheduled tasks
task_poll_time_ewma: f64
Exponentially-weighted moving average of time spent polling scheduled a task.
Tracked in nanoseconds, stored as a f64
since that is what we use with
the EWMA calculations
Implementations§
source§impl Stats
impl Stats
pub(crate) fn new(worker_metrics: &WorkerMetrics) -> Stats
pub(crate) fn tuned_global_queue_interval(&self, config: &Config) -> u32
pub(crate) fn submit(&mut self, to: &WorkerMetrics)
pub(crate) fn about_to_park(&mut self)
pub(crate) fn unparked(&mut self)
pub(crate) fn inc_local_schedule_count(&mut self)
pub(crate) fn start_processing_scheduled_tasks(&mut self)
pub(crate) fn end_processing_scheduled_tasks(&mut self)
pub(crate) fn start_poll(&mut self)
pub(crate) fn end_poll(&mut self)
pub(crate) fn incr_steal_count(&mut self, by: u16)
pub(crate) fn incr_steal_operations(&mut self)
pub(crate) fn incr_overflow_count(&mut self)
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnwindSafe for Stats
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