pub struct MetricsCollector { /* private fields */ }Expand description
Thread-safe counters and caller-recorded phase duration samples.
Implementations§
Source§impl MetricsCollector
impl MetricsCollector
pub fn new() -> Self
pub fn record_request(&self, bytes: u64)
pub fn record_response(&self, bytes: u64)
pub fn record_finding(&self)
pub fn record_error(&self)
pub fn record_phase_duration(&mut self, phase: u8, duration_ms: u64)
pub fn phase_duration_samples(&self, phase: u8) -> Option<&[u64]>
Sourcepub fn phase_mean_duration_ms(&self, phase: u8) -> Option<f64>
pub fn phase_mean_duration_ms(&self, phase: u8) -> Option<f64>
Mean calculated from the recorded samples, or None when there are none.
Sourcepub fn response_request_ratio_percent(&self) -> Option<f64>
pub fn response_request_ratio_percent(&self) -> Option<f64>
Recorded responses divided by recorded requests, expressed as percent.
pub fn findings_per_100_responses(&self) -> Option<f64>
pub fn bytes_per_finding(&self) -> Option<f64>
pub fn summary(&self) -> MetricsSummary
Trait Implementations§
Source§impl Debug for MetricsCollector
impl Debug for MetricsCollector
Auto Trait Implementations§
impl !Freeze for MetricsCollector
impl RefUnwindSafe for MetricsCollector
impl Send for MetricsCollector
impl Sync for MetricsCollector
impl Unpin for MetricsCollector
impl UnsafeUnpin for MetricsCollector
impl UnwindSafe for MetricsCollector
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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