pub struct PerformanceValidator { /* private fields */ }Expand description
Performance validator for ASR models
Implementations§
Source§impl PerformanceValidator
impl PerformanceValidator
Sourcepub fn with_requirements(requirements: PerformanceRequirements) -> Self
pub fn with_requirements(requirements: PerformanceRequirements) -> Self
Create a new performance validator with custom requirements
Sourcepub fn with_verbose(self, verbose: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
Enable verbose logging during validation
Sourcepub fn requirements(&self) -> &PerformanceRequirements
pub fn requirements(&self) -> &PerformanceRequirements
Get the performance requirements
Sourcepub fn validate_rtf(
&self,
audio: &AudioBuffer,
processing_time: Duration,
) -> (f32, bool)
pub fn validate_rtf( &self, audio: &AudioBuffer, processing_time: Duration, ) -> (f32, bool)
Validate real-time factor performance
Sourcepub fn estimate_memory_usage(&self) -> Result<(u64, bool), RecognitionError>
pub fn estimate_memory_usage(&self) -> Result<(u64, bool), RecognitionError>
Estimate memory usage (platform-specific implementation)
Sourcepub async fn measure_startup_time<F, Fut>(
&self,
startup_fn: F,
) -> Result<(u64, bool), RecognitionError>
pub async fn measure_startup_time<F, Fut>( &self, startup_fn: F, ) -> Result<(u64, bool), RecognitionError>
Measure model startup time
Sourcepub fn validate_streaming_latency(&self, latency: Duration) -> (u64, bool)
pub fn validate_streaming_latency(&self, latency: Duration) -> (u64, bool)
Validate streaming latency
Sourcepub fn calculate_throughput(
&self,
samples_processed: usize,
processing_time: Duration,
) -> f64
pub fn calculate_throughput( &self, samples_processed: usize, processing_time: Duration, ) -> f64
Calculate processing throughput
Sourcepub async fn validate_comprehensive<F, Fut>(
&self,
audio: &AudioBuffer,
startup_fn: F,
processing_time: Duration,
streaming_latency: Option<Duration>,
) -> Result<ValidationResult, RecognitionError>
pub async fn validate_comprehensive<F, Fut>( &self, audio: &AudioBuffer, startup_fn: F, processing_time: Duration, streaming_latency: Option<Duration>, ) -> Result<ValidationResult, RecognitionError>
Comprehensive performance validation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PerformanceValidator
impl RefUnwindSafe for PerformanceValidator
impl Send for PerformanceValidator
impl Sync for PerformanceValidator
impl Unpin for PerformanceValidator
impl UnwindSafe for PerformanceValidator
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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