pub struct TimingTest { /* private fields */ }Expand description
Builder for timing tests.
Implementations§
Source§impl TimingTest
impl TimingTest
Sourcepub fn iterations(self, n: usize) -> Self
pub fn iterations(self, n: usize) -> Self
Set the number of iterations.
Sourcepub fn with_percentile_cropping(self, percent: f64) -> Self
pub fn with_percentile_cropping(self, percent: f64) -> Self
Enable symmetric percentile cropping.
Removes the specified percentage of samples from both ends of the timing distribution to reduce noise from outliers.
Sourcepub fn with_asymmetric_cropping(self, low: f64, high: f64) -> Self
pub fn with_asymmetric_cropping(self, low: f64, high: f64) -> Self
Enable asymmetric percentile cropping.
Sourcepub fn run<F, R>(self, f: F) -> TimingResult
pub fn run<F, R>(self, f: F) -> TimingResult
Run the timing test.
The function f should take a Class and return some result.
Timing measurements are taken for both classes and compared.
Sourcepub fn run_online<F, R>(self, f: F) -> TimingResult
pub fn run_online<F, R>(self, f: F) -> TimingResult
Run with online statistics (memory-efficient for large iterations).
Auto Trait Implementations§
impl Freeze for TimingTest
impl RefUnwindSafe for TimingTest
impl Send for TimingTest
impl Sync for TimingTest
impl Unpin for TimingTest
impl UnwindSafe for TimingTest
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