pub struct TargetMetrics { /* private fields */ }Expand description
Per-target metrics tracked by the upstream proxy.
Each request increments:
- either
requests_acceptedorrequests_denied - on completion: either
requests_failedorrequests_completed
Implementations§
Source§impl TargetMetrics
impl TargetMetrics
Sourcepub fn denied_requests(&self) -> u64
pub fn denied_requests(&self) -> u64
Returns the number of requests denied by the auth handler for this target.
Sourcepub fn accepted_requests(&self) -> u64
pub fn accepted_requests(&self) -> u64
Returns the number of requests accepted by the auth handler for this target.
Sourcepub fn failed_requests(&self) -> u64
pub fn failed_requests(&self) -> u64
Returns the number of requests that failed (connection error, origin unreachable, etc.).
Sourcepub fn active_requests(&self) -> u64
pub fn active_requests(&self) -> u64
Returns the estimated number of currently in-flight requests for this target.
Uses saturating arithmetic since counters are read non-atomically.
Sourcepub fn bytes_to_origin(&self) -> u64
pub fn bytes_to_origin(&self) -> u64
Returns the total bytes sent to the origin server for this target.
Sourcepub fn bytes_from_origin(&self) -> u64
pub fn bytes_from_origin(&self) -> u64
Returns the total bytes received from the origin server for this target.
Trait Implementations§
Source§impl Debug for TargetMetrics
impl Debug for TargetMetrics
Source§impl Default for TargetMetrics
impl Default for TargetMetrics
Source§fn default() -> TargetMetrics
fn default() -> TargetMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for TargetMetrics
impl RefUnwindSafe for TargetMetrics
impl Send for TargetMetrics
impl Sync for TargetMetrics
impl Unpin for TargetMetrics
impl UnsafeUnpin for TargetMetrics
impl UnwindSafe for TargetMetrics
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