pub struct Probe { /* private fields */ }Expand description
Probe API. All methods are no-ops without the probe feature.
Implementations§
Source§impl Probe
impl Probe
Sourcepub fn span(name: &'static str) -> Span
pub fn span(name: &'static str) -> Span
Open a timed span. The returned guard records its name + nanos on drop into the thread-local event buffer.
Sourcepub fn sample_rss(label: &'static str, bytes: u64)
pub fn sample_rss(label: &'static str, bytes: u64)
Record an RSS checkpoint with the given label + byte count. The caller supplies the bytes (this module does not depend on platform RSS readers) so consumers can use whatever measurement helper they own.
Sourcepub fn drop_events()
pub fn drop_events()
Discard the per-thread event buffer without allocating a Vec to
hand back. Used by long-running harnesses (e.g. AZ_E2E_TEST) that
want to prevent the thread-local buffer from inflating RSS during
thousands of layout passes without actually needing the events.
Auto Trait Implementations§
impl Freeze for Probe
impl RefUnwindSafe for Probe
impl Send for Probe
impl Sync for Probe
impl Unpin for Probe
impl UnsafeUnpin for Probe
impl UnwindSafe for Probe
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
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>
Converts
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>
Converts
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