pub struct PerformanceMonitor { /* private fields */ }Expand description
Performance monitoring for operation timing and memory usage tracking
Implementations§
Source§impl PerformanceMonitor
impl PerformanceMonitor
Sourcepub fn record_operation_time(&self, operation: &str, duration: Duration)
pub fn record_operation_time(&self, operation: &str, duration: Duration)
Record the execution time of an operation
Sourcepub fn record_allocation(&self, operation: &str, size: usize)
pub fn record_allocation(&self, operation: &str, size: usize)
Record memory allocation
Sourcepub fn record_deallocation(&self, size: usize)
pub fn record_deallocation(&self, size: usize)
Record memory deallocation
Sourcepub fn get_average_time(&self, operation: &str) -> Option<Duration>
pub fn get_average_time(&self, operation: &str) -> Option<Duration>
Get average execution time for an operation
Sourcepub fn get_all_operation_times(&self) -> HashMap<String, Vec<Duration>>
pub fn get_all_operation_times(&self) -> HashMap<String, Vec<Duration>>
Get all recorded operation times
Sourcepub fn get_current_memory(&self) -> usize
pub fn get_current_memory(&self) -> usize
Get current memory usage
Sourcepub fn get_peak_memory(&self) -> usize
pub fn get_peak_memory(&self) -> usize
Get peak memory usage
Sourcepub fn get_allocation_stats(&self) -> (usize, usize)
pub fn get_allocation_stats(&self) -> (usize, usize)
Get memory allocation statistics
Sourcepub fn generate_report(&self) -> String
pub fn generate_report(&self) -> String
Generate a performance report
Sourcepub fn record_kernel_occupancy(&self, stats: KernelOccupancyStats)
pub fn record_kernel_occupancy(&self, stats: KernelOccupancyStats)
Record kernel occupancy statistics
Sourcepub fn get_kernel_occupancy(
&self,
kernel_name: &str,
) -> Vec<KernelOccupancyStats>
pub fn get_kernel_occupancy( &self, kernel_name: &str, ) -> Vec<KernelOccupancyStats>
Get kernel occupancy statistics for a specific kernel
Sourcepub fn get_all_kernel_occupancy(
&self,
) -> HashMap<String, Vec<KernelOccupancyStats>>
pub fn get_all_kernel_occupancy( &self, ) -> HashMap<String, Vec<KernelOccupancyStats>>
Get all kernel occupancy statistics
Sourcepub fn get_average_kernel_occupancy(&self, kernel_name: &str) -> Option<f32>
pub fn get_average_kernel_occupancy(&self, kernel_name: &str) -> Option<f32>
Calculate average occupancy for a kernel
Sourcepub fn generate_occupancy_report(&self) -> String
pub fn generate_occupancy_report(&self) -> String
Generate kernel occupancy analysis report
Trait Implementations§
Source§impl Debug for PerformanceMonitor
impl Debug for PerformanceMonitor
Auto Trait Implementations§
impl Freeze for PerformanceMonitor
impl RefUnwindSafe for PerformanceMonitor
impl Send for PerformanceMonitor
impl Sync for PerformanceMonitor
impl Unpin for PerformanceMonitor
impl UnsafeUnpin for PerformanceMonitor
impl UnwindSafe for PerformanceMonitor
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more