pub struct ProfilingSession {
pub profiler: Profiler,
pub sampler: SamplingProfiler,
pub alloc_tracker: AllocationTracker,
pub tactic_log: TacticProfileLog,
pub name: String,
pub running: bool,
}Expand description
Manages the lifecycle of a profiling session.
Fields§
§profiler: ProfilerMain event profiler.
sampler: SamplingProfilerSampling profiler.
alloc_tracker: AllocationTrackerAllocation tracker.
tactic_log: TacticProfileLogTactic event log.
name: StringSession name.
running: boolWhether the session is running.
Implementations§
Source§impl ProfilingSession
impl ProfilingSession
Sourcepub fn enter_function(&mut self, name: &str)
pub fn enter_function(&mut self, name: &str)
Record a function call (in both profilers).
Sourcepub fn exit_function(&mut self, name: &str)
pub fn exit_function(&mut self, name: &str)
Record a function return.
Sourcepub fn combined_report(&self) -> String
pub fn combined_report(&self) -> String
Generate a combined report.
Auto Trait Implementations§
impl Freeze for ProfilingSession
impl RefUnwindSafe for ProfilingSession
impl Send for ProfilingSession
impl Sync for ProfilingSession
impl Unpin for ProfilingSession
impl UnsafeUnpin for ProfilingSession
impl UnwindSafe for ProfilingSession
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