pub struct Session { /* private fields */ }Expand description
One causal profiling session.
Sessions are process-global because deep scanner spans use allocation-free static counters. Concurrent daemon requests must profile separately rather than merge unrelated state into one record.
Implementations§
Source§impl Session
impl Session
Sourcepub fn start(identity: RunIdentity) -> Result<Self, SessionActive>
pub fn start(identity: RunIdentity) -> Result<Self, SessionActive>
Start a fresh session and reset all fixed-stage counters.
Sourcepub fn identity_mut(&mut self) -> &mut RunIdentity
pub fn identity_mut(&mut self) -> &mut RunIdentity
Mutate run identity before the session is finalized.
Sourcepub fn transition(&mut self, state: RunState)
pub fn transition(&mut self, state: RunState)
Record an explicit macro state transition.
Sourcepub fn finish(self, status: RunState) -> RunProfile
pub fn finish(self, status: RunState) -> RunProfile
Finish the session and return its complete structured record.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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