Struct MetricsBatch

Source
pub(crate) struct MetricsBatch {
    busy_duration_total: u64,
    processing_scheduled_tasks_started_at: Option<Instant>,
    park_count: u64,
    park_unpark_count: u64,
}

Fields§

§busy_duration_total: u64

The total busy duration in nanoseconds.

§processing_scheduled_tasks_started_at: Option<Instant>

Instant at which work last resumed (continued after park).

§park_count: u64

Number of times the worker parked.

§park_unpark_count: u64

Number of times the worker parked and unparked.

Implementations§

Source§

impl MetricsBatch

Source

pub(crate) fn new(worker_metrics: &WorkerMetrics) -> MetricsBatch

Source

fn new_unstable( _worker_metrics: &WorkerMetrics, maybe_now: Option<Instant>, ) -> MetricsBatch

Source

pub(crate) fn submit(&mut self, worker: &WorkerMetrics, mean_poll_time: u64)

Source

fn submit_unstable(&mut self, worker: &WorkerMetrics, _mean_poll_time: u64)

Source

pub(crate) fn about_to_park(&mut self)

The worker is about to park.

Source

pub(crate) fn unparked(&mut self)

The worker was unparked.

Source

pub(crate) fn start_processing_scheduled_tasks(&mut self)

Start processing a batch of tasks

Source

pub(crate) fn end_processing_scheduled_tasks(&mut self)

Stop processing a batch of tasks

Source

pub(crate) fn start_poll(&mut self)

Start polling an individual task

Source

pub(crate) fn end_poll(&mut self)

Stop polling an individual task

Source

pub(crate) fn inc_local_schedule_count(&mut self)

Source§

impl MetricsBatch

Source

pub(crate) fn incr_steal_count(&mut self, _by: u16)

Source

pub(crate) fn incr_steal_operations(&mut self)

Source

pub(crate) fn incr_overflow_count(&mut self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.