pub struct SimulationConfig {
pub name: String,
pub description: String,
pub scale: ScaleConfig,
pub memory_pattern: MemoryPattern,
pub load_pattern: LoadPattern,
pub failure_config: Option<FailureConfig>,
pub max_duration: Duration,
pub report_interval: Duration,
pub detailed_metrics: bool,
pub seed: Option<u64>,
}Expand description
Main simulation configuration.
Fields§
§name: StringName of the simulation.
description: StringDescription of what this simulation tests.
scale: ScaleConfigScale configuration (number of devices, points, etc.).
memory_pattern: MemoryPatternMemory simulation pattern.
load_pattern: LoadPatternLoad pattern to apply.
failure_config: Option<FailureConfig>Failure injection configuration.
max_duration: DurationMaximum duration for the simulation.
report_interval: DurationInterval between progress reports.
detailed_metrics: boolWhether to collect detailed metrics.
seed: Option<u64>Random seed for reproducibility.
Implementations§
Source§impl SimulationConfig
impl SimulationConfig
Sourcepub fn with_scale(self, scale: ScaleConfig) -> Self
pub fn with_scale(self, scale: ScaleConfig) -> Self
Set the scale configuration.
Sourcepub fn with_memory_pattern(self, pattern: MemoryPattern) -> Self
pub fn with_memory_pattern(self, pattern: MemoryPattern) -> Self
Set the memory pattern.
Sourcepub fn with_load_pattern(self, pattern: LoadPattern) -> Self
pub fn with_load_pattern(self, pattern: LoadPattern) -> Self
Set the load pattern.
Sourcepub fn with_failures(self, config: FailureConfig) -> Self
pub fn with_failures(self, config: FailureConfig) -> Self
Set the failure configuration.
Sourcepub fn with_max_duration(self, duration: Duration) -> Self
pub fn with_max_duration(self, duration: Duration) -> Self
Set the maximum duration.
Sourcepub fn quick_test() -> Self
pub fn quick_test() -> Self
Create a quick test configuration.
Sourcepub fn stress_test() -> Self
pub fn stress_test() -> Self
Create a stress test configuration.
Sourcepub fn memory_leak_test() -> Self
pub fn memory_leak_test() -> Self
Create a memory leak detection configuration.
Trait Implementations§
Source§impl Clone for SimulationConfig
impl Clone for SimulationConfig
Source§fn clone(&self) -> SimulationConfig
fn clone(&self) -> SimulationConfig
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 SimulationConfig
impl Debug for SimulationConfig
Source§impl Default for SimulationConfig
impl Default for SimulationConfig
Source§impl<'de> Deserialize<'de> for SimulationConfig
impl<'de> Deserialize<'de> for SimulationConfig
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 SimulationConfig
impl !RefUnwindSafe for SimulationConfig
impl Send for SimulationConfig
impl Sync for SimulationConfig
impl Unpin for SimulationConfig
impl UnsafeUnpin for SimulationConfig
impl !UnwindSafe for SimulationConfig
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