pub struct ChaosConfig {
pub io_failure_pct: u8,
pub network_delay_pct: u8,
pub network_delay_range: (Duration, Duration),
pub clock_skew_pct: u8,
pub clock_skew_range_ms: (i64, i64),
pub alloc_failure_pct: u8,
pub enabled: bool,
}Expand description
Chaos injection configuration
Fields§
§io_failure_pct: u8Probability of I/O failure (0-100)
network_delay_pct: u8Probability of network delay (0-100)
network_delay_range: (Duration, Duration)Network delay range
clock_skew_pct: u8Probability of clock skew injection (0-100)
clock_skew_range_ms: (i64, i64)Clock skew range in milliseconds
alloc_failure_pct: u8Probability of memory allocation failure (0-100)
enabled: boolEnable chaos injection (master switch)
Implementations§
Source§impl ChaosConfig
impl ChaosConfig
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
Create an aggressive chaos config for stress testing
Trait Implementations§
Source§impl Clone for ChaosConfig
impl Clone for ChaosConfig
Source§fn clone(&self) -> ChaosConfig
fn clone(&self) -> ChaosConfig
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 ChaosConfig
impl Debug for ChaosConfig
Auto Trait Implementations§
impl Freeze for ChaosConfig
impl RefUnwindSafe for ChaosConfig
impl Send for ChaosConfig
impl Sync for ChaosConfig
impl Unpin for ChaosConfig
impl UnsafeUnpin for ChaosConfig
impl UnwindSafe for ChaosConfig
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