pub struct Profiler<'m> { /* fields omitted */ }
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
instance of this type can be created.
Initiates allocation profiling.
Typically the first thing in main. Its result should be assigned to a
variable whose lifetime ends at the end of main.
Panics if a Profiler has been created previously.
let _profiler = dhat::Profiler::new_heap();
Initiates ad hoc profiling.
Typically the first thing in main. Its result should be assigned to a
variable whose lifetime ends at the end of main.
Panics if a Profiler has been created previously.
let _profiler = dhat::Profiler::new_ad_hoc();
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.