Struct pprof::ProfilerGuard
source · pub struct ProfilerGuard<'a> { /* private fields */ }
Expand description
RAII structure used to stop profiling when dropped. It is the only interface to access profiler.
Implementations§
source§impl ProfilerGuard<'_>
impl ProfilerGuard<'_>
sourcepub fn new(frequency: c_int) -> Result<ProfilerGuard<'static>>
pub fn new(frequency: c_int) -> Result<ProfilerGuard<'static>>
Start profiling with given sample frequency.
sourcepub fn report(&self) -> ReportBuilder<'_>
pub fn report(&self) -> ReportBuilder<'_>
Generate a report