pub struct StatisticalAnalyzer;Expand description
Statistical analyzer for performance metrics
Implementations§
Source§impl StatisticalAnalyzer
impl StatisticalAnalyzer
pub fn new() -> Self
Sourcepub fn analyze(
&self,
step_times: &[Duration],
confidence_level: f64,
target_step_time: Option<Duration>,
) -> Result<StatisticalMetrics>
pub fn analyze( &self, step_times: &[Duration], confidence_level: f64, target_step_time: Option<Duration>, ) -> Result<StatisticalMetrics>
Computes mean/std-dev/confidence-interval from step_times, plus a
two-sided one-sample Student-t p-value against target_step_time
when the caller supplies one – see StatisticalMetrics::p_value’s
doc comment for what the null hypothesis means and why it is
sometimes absent. Uses the real Student-t distribution (via
trustformers_core::statistics), not a normal approximation, so it
stays accurate at the small sample sizes benchmarks typically use.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatisticalAnalyzer
impl RefUnwindSafe for StatisticalAnalyzer
impl Send for StatisticalAnalyzer
impl Sync for StatisticalAnalyzer
impl Unpin for StatisticalAnalyzer
impl UnsafeUnpin for StatisticalAnalyzer
impl UnwindSafe for StatisticalAnalyzer
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> 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