pub struct FaultConfig {
pub open_rate: Option<f64>,
pub read_rate: Option<f64>,
pub write_rate: Option<f64>,
pub partial_write_rate: Option<f64>,
pub sync_rate: Option<f64>,
pub resize_rate: Option<f64>,
pub partial_resize_rate: Option<f64>,
pub remove_rate: Option<f64>,
pub scan_rate: Option<f64>,
}Expand description
Configuration for deterministic storage fault injection.
Each rate is a probability from 0.0 (never fail) to 1.0 (always fail).
Fields§
§open_rate: Option<f64>Failure rate for open_versioned operations.
read_rate: Option<f64>Failure rate for read_at operations.
write_rate: Option<f64>Failure rate for write_at operations.
partial_write_rate: Option<f64>Probability that a write failure is a partial write (some bytes written
before failure) rather than a complete failure (no bytes written).
Only applies when write_rate triggers a failure.
Value from 0.0 (always complete failure) to 1.0 (always partial write).
sync_rate: Option<f64>Failure rate for sync operations.
resize_rate: Option<f64>Failure rate for resize operations.
partial_resize_rate: Option<f64>Probability that a resize failure is partial (resized to an intermediate
size before failure) rather than a complete failure (size unchanged).
Only applies when resize_rate triggers a failure.
Value from 0.0 (always complete failure) to 1.0 (always partial resize).
remove_rate: Option<f64>Failure rate for remove operations.
scan_rate: Option<f64>Failure rate for scan operations.
Implementations§
Source§impl Config
impl Config
Sourcepub const fn partial_write(self, rate: f64) -> Self
pub const fn partial_write(self, rate: f64) -> Self
Set the partial write rate (probability of partial vs complete write failure).
Sourcepub const fn partial_resize(self, rate: f64) -> Self
pub const fn partial_resize(self, rate: f64) -> Self
Set the partial resize rate (probability of partial vs complete resize failure).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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