pub struct PerformanceDiagnostic;Expand description
Performance diagnostic builder
Implementations§
Source§impl PerformanceDiagnostic
impl PerformanceDiagnostic
pub fn slow_operation( operation: &str, actual_time_ms: f64, expected_time_ms: f64, ) -> Diagnostic
pub fn high_memory_usage(peak_mb: f64, threshold_mb: f64) -> Diagnostic
Sourcepub fn parallelism_available(
num_independent_ops: usize,
current_threads: usize,
) -> Diagnostic
pub fn parallelism_available( num_independent_ops: usize, current_threads: usize, ) -> Diagnostic
Suggest increasing parallelism when independent ops exceed current thread count.
Sourcepub fn high_allocation_rate(
allocs_per_second: f64,
threshold: f64,
) -> Diagnostic
pub fn high_allocation_rate( allocs_per_second: f64, threshold: f64, ) -> Diagnostic
Suggest memory pooling when the allocation rate exceeds a threshold.
Sourcepub fn fusion_opportunity(num_fuseable: usize, op_names: &[&str]) -> Diagnostic
pub fn fusion_opportunity(num_fuseable: usize, op_names: &[&str]) -> Diagnostic
Suggest operation fusion when several fuseable ops are detected.
Sourcepub fn precision_downgrade_available(estimated_speedup: f64) -> Diagnostic
pub fn precision_downgrade_available(estimated_speedup: f64) -> Diagnostic
Suggest reducing f64 → f32 when a meaningful speedup is expected.
Auto Trait Implementations§
impl Freeze for PerformanceDiagnostic
impl RefUnwindSafe for PerformanceDiagnostic
impl Send for PerformanceDiagnostic
impl Sync for PerformanceDiagnostic
impl Unpin for PerformanceDiagnostic
impl UnsafeUnpin for PerformanceDiagnostic
impl UnwindSafe for PerformanceDiagnostic
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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