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
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ProfilerGuard<'a>
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§
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