pub struct BenchmarkConfig {
pub dataset_sizes: Vec<usize>,
pub iterations: usize,
pub accuracy_tolerance: f64,
pub timeout: Duration,
pub profile_memory: bool,
pub warmup: bool,
pub random_seed: u64,
}Expand description
Configuration for benchmark execution
Fields§
§dataset_sizes: Vec<usize>Dataset sizes to test (number of samples)
iterations: usizeNumber of benchmark iterations for statistical accuracy
accuracy_tolerance: f64Maximum acceptable accuracy difference from reference
timeout: DurationTimeout for individual benchmark runs
profile_memory: boolWhether to include memory profiling
warmup: boolWhether to warm up before benchmarking
random_seed: u64Random seed for reproducible benchmarks
Implementations§
Source§impl BenchmarkConfig
impl BenchmarkConfig
Sourcepub fn with_dataset_sizes(self, sizes: Vec<usize>) -> Self
pub fn with_dataset_sizes(self, sizes: Vec<usize>) -> Self
Set the dataset sizes to benchmark
Sourcepub fn with_iterations(self, iterations: usize) -> Self
pub fn with_iterations(self, iterations: usize) -> Self
Set the number of iterations
Sourcepub fn with_accuracy_tolerance(self, tolerance: f64) -> Self
pub fn with_accuracy_tolerance(self, tolerance: f64) -> Self
Set the accuracy tolerance
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set the timeout duration
Sourcepub fn with_memory_profiling(self, enable: bool) -> Self
pub fn with_memory_profiling(self, enable: bool) -> Self
Enable or disable memory profiling
Sourcepub fn with_random_seed(self, seed: u64) -> Self
pub fn with_random_seed(self, seed: u64) -> Self
Set random seed for reproducible results
Trait Implementations§
Source§impl Clone for BenchmarkConfig
impl Clone for BenchmarkConfig
Source§fn clone(&self) -> BenchmarkConfig
fn clone(&self) -> BenchmarkConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BenchmarkConfig
impl Debug for BenchmarkConfig
Source§impl Default for BenchmarkConfig
impl Default for BenchmarkConfig
Source§impl<'de> Deserialize<'de> for BenchmarkConfig
impl<'de> Deserialize<'de> for BenchmarkConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BenchmarkConfig
impl RefUnwindSafe for BenchmarkConfig
impl Send for BenchmarkConfig
impl Sync for BenchmarkConfig
impl Unpin for BenchmarkConfig
impl UnwindSafe for BenchmarkConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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