pub struct GpuPerformanceProfiler { /* private fields */ }
Expand description
Performance profiling and optimization utilities
Implementations§
Source§impl GpuPerformanceProfiler
impl GpuPerformanceProfiler
pub fn new(backend: GpuBackend) -> Self
Sourcepub fn profile_operation<F, R>(
&mut self,
operationname: &str,
operation: F,
) -> Result<R, GpuError>
pub fn profile_operation<F, R>( &mut self, operationname: &str, operation: F, ) -> Result<R, GpuError>
Profile a GPU operation and collect timing data
Sourcepub fn get_average_time(&self, operationname: &str) -> Option<f64>
pub fn get_average_time(&self, operationname: &str) -> Option<f64>
Get average execution time for an operation
Sourcepub fn get_recommendations(&self) -> Vec<String>
pub fn get_recommendations(&self) -> Vec<String>
Get performance recommendations based on collected data
Sourcepub fn get_operation_metrics(
&self,
operationname: &str,
) -> Option<OperationMetrics>
pub fn get_operation_metrics( &self, operationname: &str, ) -> Option<OperationMetrics>
Get detailed performance metrics for a specific operation
Sourcepub fn reset_metrics(&mut self)
pub fn reset_metrics(&mut self)
Reset all performance data
Sourcepub fn export_metrics(&self) -> Vec<OperationMetrics>
pub fn export_metrics(&self) -> Vec<OperationMetrics>
Export performance data for analysis
Auto Trait Implementations§
impl Freeze for GpuPerformanceProfiler
impl RefUnwindSafe for GpuPerformanceProfiler
impl Send for GpuPerformanceProfiler
impl Sync for GpuPerformanceProfiler
impl Unpin for GpuPerformanceProfiler
impl UnwindSafe for GpuPerformanceProfiler
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