pub struct AuthMetrics {
pub total_requests: AtomicU64,
pub successful_auths: AtomicU64,
pub failed_auths: AtomicU64,
pub cached_hits: AtomicU64,
pub validation_time_ms: AtomicU64,
}
Expand description
Authentication metrics for monitoring
Fields§
§total_requests: AtomicU64
Total authentication requests
successful_auths: AtomicU64
Successful authentications
failed_auths: AtomicU64
Failed authentications
cached_hits: AtomicU64
Cached authentication hits
validation_time_ms: AtomicU64
Total validation time in milliseconds
Implementations§
Source§impl AuthMetrics
impl AuthMetrics
Sourcepub fn total_requests(&self) -> u64
pub fn total_requests(&self) -> u64
Get total requests
Sourcepub fn successful_auths(&self) -> u64
pub fn successful_auths(&self) -> u64
Get successful authentications
Sourcepub fn failed_auths(&self) -> u64
pub fn failed_auths(&self) -> u64
Get failed authentications
Sourcepub fn cached_hits(&self) -> u64
pub fn cached_hits(&self) -> u64
Get cache hits
Sourcepub fn avg_validation_time_ms(&self) -> f64
pub fn avg_validation_time_ms(&self) -> f64
Get average validation time in milliseconds
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get success rate as percentage
Sourcepub fn cache_hit_rate(&self) -> f64
pub fn cache_hit_rate(&self) -> f64
Get cache hit rate as percentage
Trait Implementations§
Source§impl Debug for AuthMetrics
impl Debug for AuthMetrics
Source§impl Default for AuthMetrics
impl Default for AuthMetrics
Source§fn default() -> AuthMetrics
fn default() -> AuthMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for AuthMetrics
impl RefUnwindSafe for AuthMetrics
impl Send for AuthMetrics
impl Sync for AuthMetrics
impl Unpin for AuthMetrics
impl UnwindSafe for AuthMetrics
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