pub struct MetricsReport {
pub attempts: Vec<AttemptMetrics>,
pub total_duration: Option<Duration>,
pub transaction: TransactionInfo,
}Expand description
The metrics of a whole instrumented_run: the detail of every attempt plus
the aggregates that only make sense for the run as a whole.
Fields§
§attempts: Vec<AttemptMetrics>One entry per transaction attempt, in order. Nothing is lost across retries.
total_duration: Option<Duration>Wall clock of the whole run, every attempt and backoff included.
transaction: TransactionInfoInformation that spans attempts.
Implementations§
Source§impl MetricsReport
impl MetricsReport
Sourcepub fn total_usage(&self) -> UsageSnapshot
pub fn total_usage(&self) -> UsageSnapshot
Sums the usage of every attempt, retries included.
elapsed is the sum of the attempt durations, which is shorter than
total_duration: the retry backoffs are not
part of any attempt.
Sourcepub fn last_attempt(&self) -> Option<&AttemptMetrics>
pub fn last_attempt(&self) -> Option<&AttemptMetrics>
The attempt that ended the run, None if no attempt was ever started.
Trait Implementations§
Source§impl Clone for MetricsReport
impl Clone for MetricsReport
Source§fn clone(&self) -> MetricsReport
fn clone(&self) -> MetricsReport
Returns a copy 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 MetricsReport
impl Debug for MetricsReport
Source§impl Default for MetricsReport
impl Default for MetricsReport
Source§fn default() -> MetricsReport
fn default() -> MetricsReport
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetricsReport
impl RefUnwindSafe for MetricsReport
impl Send for MetricsReport
impl Sync for MetricsReport
impl Unpin for MetricsReport
impl UnwindSafe for MetricsReport
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