pub struct YieldTiming {
pub enqueued_us: u64,
pub started_us: u64,
pub finished_us: u64,
pub woken_us: u64,
}Expand description
Wall-clock phases of one closure handed to a worker pool: queue wait, run, and the gap between the result being ready and the awaiting task being polled again.
The three phases attribute a slow yield to the pool queue, the closure itself, or the executor. A long stall in every phase at once means the process was not being run.
Fields§
§enqueued_us: u64Microseconds when the closure was handed to the pool
started_us: u64Microseconds when a pool thread began running it
finished_us: u64Microseconds when it returned
woken_us: u64Microseconds when the awaiting task observed the result
Implementations§
Source§impl YieldTiming
impl YieldTiming
Sourcepub fn wake_us(&self) -> u64
pub fn wake_us(&self) -> u64
Time between the result being ready and the awaiting task resuming
Sourcepub fn log_inline_yield_if_slow(yielded_us: u64, woken_us: u64)
pub fn log_inline_yield_if_slow(yielded_us: u64, woken_us: u64)
Log a bare executor yield (no pool) whose wakeup took at least the reporting floor
Sourcepub fn log_if_slow(&self, pool: &str, depth: Option<usize>)
pub fn log_if_slow(&self, pool: &str, depth: Option<usize>)
Log the phase split when slow; depth is the pool’s queue depth at enqueue, for
pools that expose one
Trait Implementations§
Source§impl Clone for YieldTiming
impl Clone for YieldTiming
impl Copy for YieldTiming
Source§impl Debug for YieldTiming
impl Debug for YieldTiming
impl Eq for YieldTiming
Source§impl PartialEq for YieldTiming
impl PartialEq for YieldTiming
impl StructuralPartialEq for YieldTiming
Auto Trait Implementations§
impl Freeze for YieldTiming
impl RefUnwindSafe for YieldTiming
impl Send for YieldTiming
impl Sync for YieldTiming
impl Unpin for YieldTiming
impl UnsafeUnpin for YieldTiming
impl UnwindSafe for YieldTiming
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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