pub struct BotMetrics { /* private fields */ }Expand description
Metrics for monitoring bot performance
Implementations§
Source§impl BotMetrics
impl BotMetrics
Sourcepub fn requests_total(&self) -> u64
pub fn requests_total(&self) -> u64
Get the total number of requests
Sourcepub fn success_total(&self) -> u64
pub fn success_total(&self) -> u64
Get the total number of successful responses
Sourcepub fn errors_total(&self) -> u64
pub fn errors_total(&self) -> u64
Get the total number of errors
Sourcepub fn average_response_time(&self) -> Option<Duration>
pub fn average_response_time(&self) -> Option<Duration>
Get the average response time
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get the success rate as a percentage
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BotMetrics
impl !RefUnwindSafe for BotMetrics
impl Send for BotMetrics
impl Sync for BotMetrics
impl Unpin for BotMetrics
impl !UnwindSafe for BotMetrics
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