pub struct Profiler { /* private fields */ }Expand description
Combined profiler that manages all profiling subsystems.
Implementations§
Source§impl Profiler
impl Profiler
Sourcepub fn new(config: ProfilerConfig) -> Self
pub fn new(config: ProfilerConfig) -> Self
Create a new profiler with the given configuration.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create a profiler with default configuration.
Sourcepub fn config(&self) -> &ProfilerConfig
pub fn config(&self) -> &ProfilerConfig
Get the profiler configuration.
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if profiling is active.
Sourcepub fn record_allocation(&self, label: &str, size: usize)
pub fn record_allocation(&self, label: &str, size: usize)
Record a memory allocation.
Sourcepub fn record_deallocation(&self, label: &str, size: usize)
pub fn record_deallocation(&self, label: &str, size: usize)
Record a memory deallocation.
Sourcepub fn snapshot(&self) -> MemorySnapshot
pub fn snapshot(&self) -> MemorySnapshot
Take a memory snapshot.
Sourcepub fn check_leaks(&self) -> Vec<LeakWarning>
pub fn check_leaks(&self) -> Vec<LeakWarning>
Check for potential memory leaks.
Sourcepub fn generate_report(&self) -> ProfileReport
pub fn generate_report(&self) -> ProfileReport
Generate a comprehensive profiling report.
Sourcepub fn memory_profiler(&self) -> Arc<RwLock<MemoryProfiler>> ⓘ
pub fn memory_profiler(&self) -> Arc<RwLock<MemoryProfiler>> ⓘ
Get the memory profiler.
Sourcepub fn leak_detector(&self) -> Arc<RwLock<LeakDetector>> ⓘ
pub fn leak_detector(&self) -> Arc<RwLock<LeakDetector>> ⓘ
Get the leak detector.
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