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
sourceimpl 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
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ProfilerGuard<'a>
impl<'a> Send for ProfilerGuard<'a>
impl<'a> Sync for ProfilerGuard<'a>
impl<'a> Unpin for ProfilerGuard<'a>
impl<'a> !UnwindSafe for ProfilerGuard<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more