pub struct WebHandlerMetrics {
pub browse_requests: AtomicU64,
pub cache_hits: AtomicU64,
pub cache_misses: AtomicU64,
pub directory_listings: AtomicU64,
pub file_serves: AtomicU64,
pub errors: AtomicU64,
pub total_response_time_ms: AtomicU64,
}Expand description
Atomic performance tracking for web handlers
Fields§
§browse_requests: AtomicU64§cache_hits: AtomicU64§cache_misses: AtomicU64§directory_listings: AtomicU64§file_serves: AtomicU64§errors: AtomicU64§total_response_time_ms: AtomicU64Implementations§
Source§impl WebHandlerMetrics
impl WebHandlerMetrics
pub fn new() -> Self
pub fn record_browse_request(&self, response_time_ms: u64, cache_hit: bool)
pub fn record_directory_listing(&self, response_time_ms: u64)
pub fn record_file_serve(&self, response_time_ms: u64)
pub fn record_error(&self)
pub fn get_stats(&self) -> WebHandlerStats
Auto Trait Implementations§
impl !Freeze for WebHandlerMetrics
impl RefUnwindSafe for WebHandlerMetrics
impl Send for WebHandlerMetrics
impl Sync for WebHandlerMetrics
impl Unpin for WebHandlerMetrics
impl UnwindSafe for WebHandlerMetrics
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