pub struct ConversionProfiler { /* private fields */ }Expand description
Comprehensive performance profiler for voice conversion operations
Implementations§
Source§impl ConversionProfiler
impl ConversionProfiler
Sourcepub fn with_config(config: ProfilingConfig) -> Self
pub fn with_config(config: ProfilingConfig) -> Self
Create a new profiler with custom configuration
Sourcepub fn start_session(
&self,
conversion_type: ConversionType,
audio_info: AudioInfo,
) -> String
pub fn start_session( &self, conversion_type: ConversionType, audio_info: AudioInfo, ) -> String
Start a new profiling session
Sourcepub fn end_session(&self, session_id: &str) -> Result<ProfilingReport>
pub fn end_session(&self, session_id: &str) -> Result<ProfilingReport>
End a profiling session and perform analysis
Sourcepub fn record_stage_timing(
&self,
session_id: &str,
stage_name: &str,
duration: Duration,
)
pub fn record_stage_timing( &self, session_id: &str, stage_name: &str, duration: Duration, )
Record timing for a specific stage
Sourcepub fn record_memory_sample(
&self,
session_id: &str,
memory_usage: usize,
active_allocations: usize,
)
pub fn record_memory_sample( &self, session_id: &str, memory_usage: usize, active_allocations: usize, )
Record memory usage sample
Sourcepub fn record_cpu_sample(
&self,
session_id: &str,
cpu_usage: f64,
memory_usage: usize,
)
pub fn record_cpu_sample( &self, session_id: &str, cpu_usage: f64, memory_usage: usize, )
Record CPU usage sample
Sourcepub fn get_global_metrics(&self) -> GlobalMetrics
pub fn get_global_metrics(&self) -> GlobalMetrics
Get global performance metrics
Sourcepub fn get_session_report(&self, session_id: &str) -> Result<ProfilingReport>
pub fn get_session_report(&self, session_id: &str) -> Result<ProfilingReport>
Get detailed report for a specific session
Sourcepub fn get_performance_trends(&self) -> Vec<TrendDataPoint>
pub fn get_performance_trends(&self) -> Vec<TrendDataPoint>
Get performance trends over time
Trait Implementations§
Source§impl Debug for ConversionProfiler
impl Debug for ConversionProfiler
Auto Trait Implementations§
impl Freeze for ConversionProfiler
impl RefUnwindSafe for ConversionProfiler
impl Send for ConversionProfiler
impl Sync for ConversionProfiler
impl Unpin for ConversionProfiler
impl UnsafeUnpin for ConversionProfiler
impl UnwindSafe for ConversionProfiler
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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