pub struct Profiler { /* private fields */ }Expand description
Performance profiler
Implementations§
Source§impl Profiler
impl Profiler
Sourcepub fn start_timer(&mut self, name: impl Into<String>, timestamp: f64)
pub fn start_timer(&mut self, name: impl Into<String>, timestamp: f64)
Starts a timer
Sourcepub fn stop_timer(&mut self, name: impl Into<String>, timestamp: f64)
pub fn stop_timer(&mut self, name: impl Into<String>, timestamp: f64)
Stops a timer and records the duration
Sourcepub fn record_memory(&mut self, timestamp: f64)
pub fn record_memory(&mut self, timestamp: f64)
Records current memory usage
Sourcepub fn counter_stats(&self, name: &str) -> Option<CounterStats>
pub fn counter_stats(&self, name: &str) -> Option<CounterStats>
Returns counter statistics
Sourcepub fn all_counter_stats(&self) -> Vec<CounterStats>
pub fn all_counter_stats(&self) -> Vec<CounterStats>
Returns all counter statistics
Sourcepub fn memory_stats(&self) -> MemoryStats
pub fn memory_stats(&self) -> MemoryStats
Returns memory statistics
Sourcepub fn summary(&self) -> ProfilerSummary
pub fn summary(&self) -> ProfilerSummary
Returns a summary report
Sourcepub fn clear_counter(&mut self, name: &str)
pub fn clear_counter(&mut self, name: &str)
Clears a specific counter
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Profiler
impl RefUnwindSafe for Profiler
impl Send for Profiler
impl Sync for Profiler
impl Unpin for Profiler
impl UnsafeUnpin 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