pub struct QueueTimer<'a> { /* private fields */ }Expand description
Thin wrapper for recording queue-wait latency around one await point.
Implementations§
Source§impl QueueTimer<'_>
impl QueueTimer<'_>
Sourcepub fn with_depth_at_start(self, depth_at_start: u64) -> Self
pub fn with_depth_at_start(self, depth_at_start: u64) -> Self
Sets the queue depth sample captured at wait start.
Sourcepub async fn await_on<Fut, T>(self, fut: Fut) -> Twhere
Fut: Future<Output = T>,
pub async fn await_on<Fut, T>(self, fut: Fut) -> Twhere
Fut: Future<Output = T>,
Awaits fut, records queue wait duration, and returns the original output.
Queue events are interpreted as application-level wait evidence (a lead, not proof). Record these around bounded resources to help separate queueing pressure from slow downstream stage time.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for QueueTimer<'a>
impl<'a> !RefUnwindSafe for QueueTimer<'a>
impl<'a> Send for QueueTimer<'a>
impl<'a> Sync for QueueTimer<'a>
impl<'a> Unpin for QueueTimer<'a>
impl<'a> UnsafeUnpin for QueueTimer<'a>
impl<'a> !UnwindSafe for QueueTimer<'a>
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