pub struct PerformanceProfiler { /* private fields */ }Expand description
Main performance profiler for ML algorithms
Implementations§
Source§impl PerformanceProfiler
impl PerformanceProfiler
Sourcepub fn with_config(config: ProfilerConfig) -> Self
pub fn with_config(config: ProfilerConfig) -> Self
Create profiler with custom configuration
Sourcepub fn profile<F, R>(&mut self, f: F) -> Result<ProfileResult<R>>where
F: FnOnce() -> R,
pub fn profile<F, R>(&mut self, f: F) -> Result<ProfileResult<R>>where
F: FnOnce() -> R,
Profile a function execution
Sourcepub fn profile_detailed<F, R>(
&mut self,
f: F,
) -> Result<DetailedProfileResult<R>>where
F: FnOnce(&mut ProfilerContext<'_>) -> R,
pub fn profile_detailed<F, R>(
&mut self,
f: F,
) -> Result<DetailedProfileResult<R>>where
F: FnOnce(&mut ProfilerContext<'_>) -> R,
Profile with detailed breakdown
Sourcepub fn profile_memory<F, R>(&mut self, f: F) -> Result<MemoryProfile<R>>where
F: FnOnce() -> R,
pub fn profile_memory<F, R>(&mut self, f: F) -> Result<MemoryProfile<R>>where
F: FnOnce() -> R,
Profile memory usage
Sourcepub fn identify_bottlenecks(&self) -> Result<BottleneckAnalysis>
pub fn identify_bottlenecks(&self) -> Result<BottleneckAnalysis>
Identify performance bottlenecks
Sourcepub fn generate_optimization_hints(
&self,
metrics: &ProfileMetrics,
) -> Result<Vec<OptimizationHint>>
pub fn generate_optimization_hints( &self, metrics: &ProfileMetrics, ) -> Result<Vec<OptimizationHint>>
Generate optimization recommendations
Trait Implementations§
Source§impl Debug for PerformanceProfiler
impl Debug for PerformanceProfiler
Auto Trait Implementations§
impl Freeze for PerformanceProfiler
impl RefUnwindSafe for PerformanceProfiler
impl Send for PerformanceProfiler
impl Sync for PerformanceProfiler
impl Unpin for PerformanceProfiler
impl UnwindSafe for PerformanceProfiler
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