pub struct LoadTestResults {
pub total_requests: usize,
pub successful_requests: usize,
pub failed_requests: usize,
pub duration: Duration,
pub avg_rps: f64,
pub response_times: ResponseTimeStats,
pub errors: Vec<(String, usize)>,
}Expand description
Performance test results
Fields§
§total_requests: usizeTotal requests made
successful_requests: usizeSuccessful requests
failed_requests: usizeFailed requests
duration: DurationTest duration
avg_rps: f64Average requests per second
response_times: ResponseTimeStatsResponse time statistics
errors: Vec<(String, usize)>Error distribution
Implementations§
Source§impl LoadTestResults
impl LoadTestResults
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Calculate success rate as percentage
Sourcepub fn passes_criteria(
&self,
min_success_rate: f64,
max_avg_response_time: Duration,
) -> bool
pub fn passes_criteria( &self, min_success_rate: f64, max_avg_response_time: Duration, ) -> bool
Check if the test passed based on criteria
Trait Implementations§
Source§impl Clone for LoadTestResults
impl Clone for LoadTestResults
Source§fn clone(&self) -> LoadTestResults
fn clone(&self) -> LoadTestResults
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 moreAuto Trait Implementations§
impl Freeze for LoadTestResults
impl RefUnwindSafe for LoadTestResults
impl Send for LoadTestResults
impl Sync for LoadTestResults
impl Unpin for LoadTestResults
impl UnwindSafe for LoadTestResults
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