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 new() -> BenchmarkConfig
pub fn new() -> BenchmarkConfig
Create a new benchmark configuration with default settings
Sourcepub fn with_dataset_sizes(self, sizes: Vec<usize>) -> BenchmarkConfig
pub fn with_dataset_sizes(self, sizes: Vec<usize>) -> BenchmarkConfig
Set the dataset sizes to benchmark
Sourcepub fn with_iterations(self, iterations: usize) -> BenchmarkConfig
pub fn with_iterations(self, iterations: usize) -> BenchmarkConfig
Set the number of iterations
Sourcepub fn with_accuracy_tolerance(self, tolerance: f64) -> BenchmarkConfig
pub fn with_accuracy_tolerance(self, tolerance: f64) -> BenchmarkConfig
Set the accuracy tolerance
Sourcepub fn with_timeout(self, timeout: Duration) -> BenchmarkConfig
pub fn with_timeout(self, timeout: Duration) -> BenchmarkConfig
Set the timeout duration
Sourcepub fn with_memory_profiling(self, enable: bool) -> BenchmarkConfig
pub fn with_memory_profiling(self, enable: bool) -> BenchmarkConfig
Enable or disable memory profiling
Sourcepub fn with_random_seed(self, seed: u64) -> BenchmarkConfig
pub fn with_random_seed(self, seed: u64) -> BenchmarkConfig
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§fn default() -> BenchmarkConfig
fn default() -> BenchmarkConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BenchmarkConfig
impl<'de> Deserialize<'de> for BenchmarkConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BenchmarkConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BenchmarkConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BenchmarkConfig
impl Serialize for BenchmarkConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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