pub struct Profiler;
Expand description
A type whose lifetime dictates the start and end of profiling.
Profiling starts when the first value of this type is created. Profiling
stops when (a) this value is dropped or (b) a dhat
assertion fails,
whichever comes first. When that happens, profiling data may be written to
file, depending on how the Profiler
has been configured. Only one
Profiler
can be running at any point in time.
Implementations§
source§impl Profiler
impl Profiler
sourcepub fn new_ad_hoc() -> Self
pub fn new_ad_hoc() -> Self
sourcepub fn builder() -> ProfilerBuilder
pub fn builder() -> ProfilerBuilder
Creates a new ProfilerBuilder
, which defaults to heap profiling.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Profiler
impl Send for Profiler
impl Sync for Profiler
impl Unpin for Profiler
impl UnwindSafe for Profiler
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