pub struct Sample { /* private fields */ }
Expand description
A collection of metrics taken from the benchmark for a given time window.
The sample contains the standard metrics (latency, IO, etc…) along with any errors, the worker ID and sample tag which can be used to group results.
Internally this uses HDR Histograms which can generate the min, max, stdev and varying percentile statistics of the benchmark.
Implementations§
Source§impl Sample
impl Sample
Sourcepub fn total_requests(&self) -> usize
pub fn total_requests(&self) -> usize
The total number of requests within the sample including any errors.
Sourcepub fn total_successful_requests(&self) -> usize
pub fn total_successful_requests(&self) -> usize
The total number of requests within the sample that passed validation and did not error.
Sourcepub fn total_duration(&self) -> Duration
pub fn total_duration(&self) -> Duration
The total duration of requests within the sample.
Sourcepub fn total_latency_duration(&self) -> Duration
pub fn total_latency_duration(&self) -> Duration
The total duration of requests within the sample from the latency of each request.
Sourcepub fn write_transfer(&self) -> &Histogram<u32>
pub fn write_transfer(&self) -> &Histogram<u32>
The sample write transfer rate histogram
Sourcepub fn read_transfer(&self) -> &Histogram<u32>
pub fn read_transfer(&self) -> &Histogram<u32>
The sample read transfer rate histogram
Sourcepub fn errors(&self) -> &[ValidationError]
pub fn errors(&self) -> &[ValidationError]
The errors that occurred during the sample
Trait Implementations§
Source§impl AddAssign for Sample
impl AddAssign for Sample
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+=
operation. Read more