pub struct StressTestConfig {
pub target: StressTarget,
pub duration: Duration,
pub intensity: f64,
pub ramp_up: Duration,
pub chaos_preset: Option<ChaosPreset>,
pub collect_metrics: bool,
pub export_report: bool,
}Expand description
Stress test configuration
Fields§
§target: StressTargetTarget resource(s) to stress
duration: DurationTest duration
intensity: f64Intensity (0.0-1.0, where 1.0 = maximum load)
ramp_up: DurationRamp-up duration (gradual increase)
chaos_preset: Option<ChaosPreset>Chaos engineering preset (optional)
collect_metrics: boolWhether to collect detailed metrics
export_report: boolWhether to export report on completion
Implementations§
Source§impl StressTestConfig
impl StressTestConfig
Sourcepub fn with_target(self, target: StressTarget) -> Self
pub fn with_target(self, target: StressTarget) -> Self
Set target
Sourcepub fn with_duration(self, duration: Duration) -> Self
pub fn with_duration(self, duration: Duration) -> Self
Set duration
Sourcepub fn with_intensity(self, intensity: f64) -> Self
pub fn with_intensity(self, intensity: f64) -> Self
Set intensity
Sourcepub fn with_ramp_up(self, ramp_up: Duration) -> Self
pub fn with_ramp_up(self, ramp_up: Duration) -> Self
Set ramp-up duration
Sourcepub fn with_chaos(self, preset: ChaosPreset) -> Self
pub fn with_chaos(self, preset: ChaosPreset) -> Self
Set chaos preset
Sourcepub fn parse_duration(s: &str) -> Option<Duration>
pub fn parse_duration(s: &str) -> Option<Duration>
Parse duration from string (e.g., “60s”, “5m”, “1h”)
Trait Implementations§
Source§impl Clone for StressTestConfig
impl Clone for StressTestConfig
Source§fn clone(&self) -> StressTestConfig
fn clone(&self) -> StressTestConfig
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 StressTestConfig
impl Debug for StressTestConfig
Auto Trait Implementations§
impl Freeze for StressTestConfig
impl RefUnwindSafe for StressTestConfig
impl Send for StressTestConfig
impl Sync for StressTestConfig
impl Unpin for StressTestConfig
impl UnsafeUnpin for StressTestConfig
impl UnwindSafe for StressTestConfig
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