pub struct MetricsState {
pub requests_total: AtomicU64,
pub schema_pass: AtomicU64,
pub schema_fail: AtomicU64,
pub qom_pass: AtomicU64,
pub qom_fail: AtomicU64,
pub handshakes: AtomicU64,
pub downgrades: AtomicU64,
}Expand description
Thread-safe metrics state
Fields§
§requests_total: AtomicU64§schema_pass: AtomicU64§schema_fail: AtomicU64§qom_pass: AtomicU64§qom_fail: AtomicU64§handshakes: AtomicU64§downgrades: AtomicU64Implementations§
Source§impl MetricsState
impl MetricsState
Sourcepub fn inc_requests(&self)
pub fn inc_requests(&self)
Increment total requests
Sourcepub fn inc_schema_pass(&self)
pub fn inc_schema_pass(&self)
Increment schema pass count
Sourcepub fn inc_schema_fail(&self)
pub fn inc_schema_fail(&self)
Increment schema fail count
Sourcepub fn inc_qom_pass(&self)
pub fn inc_qom_pass(&self)
Increment QoM pass count
Sourcepub fn inc_qom_fail(&self)
pub fn inc_qom_fail(&self)
Increment QoM fail count
Sourcepub fn inc_handshakes(&self)
pub fn inc_handshakes(&self)
Increment handshake count
Sourcepub fn inc_downgrades(&self)
pub fn inc_downgrades(&self)
Increment downgrade count
Sourcepub fn schema_pass_rate(&self) -> f64
pub fn schema_pass_rate(&self) -> f64
Calculate schema pass rate
Sourcepub fn qom_pass_rate(&self) -> f64
pub fn qom_pass_rate(&self) -> f64
Calculate QoM pass rate
Sourcepub fn downgrade_rate(&self) -> f64
pub fn downgrade_rate(&self) -> f64
Calculate downgrade rate
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MetricsState
impl RefUnwindSafe for MetricsState
impl Send for MetricsState
impl Sync for MetricsState
impl Unpin for MetricsState
impl UnwindSafe for MetricsState
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§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