pub struct StartupSpans<C: Clock = SystemClock> { /* private fields */ }Expand description
Named monotonic timestamps from a begin() epoch —
a shell records one named span at each startup milestone (see the
SPAN_* consts), then calls Self::emit_log once for a single
summary line.
Implementations§
Source§impl<C: Clock> StartupSpans<C>
impl<C: Clock> StartupSpans<C>
Sourcepub fn begin_with_enabled(clock: C, is_enabled: bool) -> Self
pub fn begin_with_enabled(clock: C, is_enabled: bool) -> Self
Test/advanced seam: begin with an explicit clock and enabled flag,
bypassing enabled’s cache (see FrameStats::new_enabled’s docs
for why).
Sourcepub fn record(&mut self, name: &'static str)
pub fn record(&mut self, name: &'static str)
Record name at the current clock reading, as a delta from
Self::begin’s epoch. A no-op (no clock read, no allocation) when
disabled.
Auto Trait Implementations§
impl<C> Freeze for StartupSpans<C>where
C: Freeze,
impl<C> RefUnwindSafe for StartupSpans<C>where
C: RefUnwindSafe,
impl<C> Send for StartupSpans<C>where
C: Send,
impl<C> Sync for StartupSpans<C>where
C: Sync,
impl<C> Unpin for StartupSpans<C>where
C: Unpin,
impl<C> UnsafeUnpin for StartupSpans<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for StartupSpans<C>where
C: UnwindSafe,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.