pub struct ComputeProfiler { /* private fields */ }Expand description
Compute profiler for tracking operation execution times.
Implementations§
Source§impl ComputeProfiler
impl ComputeProfiler
Sourcepub fn start_with_flops(&mut self, name: &str, flops: f64)
pub fn start_with_flops(&mut self, name: &str, flops: f64)
Starts profiling an operation with FLOPS count.
Sourcepub fn start_with_bytes(&mut self, name: &str, bytes: usize)
pub fn start_with_bytes(&mut self, name: &str, bytes: usize)
Starts profiling an operation with bytes processed.
Sourcepub fn get_stats(&self, name: &str) -> Option<&OperationStats>
pub fn get_stats(&self, name: &str) -> Option<&OperationStats>
Gets statistics for a specific operation.
Sourcepub fn all_stats(&self) -> HashMap<String, OperationStats>
pub fn all_stats(&self) -> HashMap<String, OperationStats>
Gets all operation statistics.
Sourcepub fn total_time(&self, name: &str) -> Duration
pub fn total_time(&self, name: &str) -> Duration
Gets total time for an operation.
Sourcepub fn top_by_time(&self, n: usize) -> Vec<&OperationStats>
pub fn top_by_time(&self, n: usize) -> Vec<&OperationStats>
Gets the top N operations by total time.
Sourcepub fn top_by_calls(&self, n: usize) -> Vec<&OperationStats>
pub fn top_by_calls(&self, n: usize) -> Vec<&OperationStats>
Gets the top N operations by call count.
Sourcepub fn format_duration(d: Duration) -> String
pub fn format_duration(d: Duration) -> String
Formats a duration for display.
Trait Implementations§
Source§impl Debug for ComputeProfiler
impl Debug for ComputeProfiler
Auto Trait Implementations§
impl Freeze for ComputeProfiler
impl RefUnwindSafe for ComputeProfiler
impl Send for ComputeProfiler
impl Sync for ComputeProfiler
impl Unpin for ComputeProfiler
impl UnwindSafe for ComputeProfiler
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