pub struct LoadTestState {
pub total_ops: Arc<AtomicU64>,
pub successful_ops: Arc<AtomicU64>,
pub failed_ops: Arc<AtomicU64>,
pub cache_hits: Arc<AtomicU64>,
pub cache_misses: Arc<AtomicU64>,
pub latencies: Arc<Mutex<Vec<u64>>>,
}Expand description
Shared state for coordinating load test execution
Fields§
§total_ops: Arc<AtomicU64>§successful_ops: Arc<AtomicU64>§failed_ops: Arc<AtomicU64>§cache_hits: Arc<AtomicU64>§cache_misses: Arc<AtomicU64>§latencies: Arc<Mutex<Vec<u64>>>Implementations§
Source§impl LoadTestState
impl LoadTestState
Source§impl LoadTestState
impl LoadTestState
pub fn record_operation(&self, latency_ms: u64, success: bool, cache_hit: bool)
pub fn get_metrics(&self, duration_ms: u64) -> LoadTestMetrics
Trait Implementations§
Source§impl Clone for LoadTestState
impl Clone for LoadTestState
Source§impl Debug for LoadTestState
impl Debug for LoadTestState
Auto Trait Implementations§
impl !RefUnwindSafe for LoadTestState
impl !UnwindSafe for LoadTestState
impl Forget for LoadTestState
impl Freeze for LoadTestState
impl Send for LoadTestState
impl Sync for LoadTestState
impl Unpin for LoadTestState
impl UnsafeUnpin for LoadTestState
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> 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> ⓘ
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