pub struct ProviderMetrics {
pub ewma_latency_ms: f64,
pub error_rate: f64,
pub cost_per_1k_tokens: f64,
pub request_count: u64,
pub error_count: u64,
pub last_updated: SystemTime,
}Expand description
Provider performance metrics
Fields§
§ewma_latency_ms: f64Exponential weighted moving average latency (milliseconds)
error_rate: f64Error rate (0.0 to 1.0)
cost_per_1k_tokens: f64Cost per 1000 tokens (normalized)
request_count: u64Total requests processed
error_count: u64Total errors
last_updated: SystemTimeLast update timestamp
Trait Implementations§
Source§impl Clone for ProviderMetrics
impl Clone for ProviderMetrics
Source§fn clone(&self) -> ProviderMetrics
fn clone(&self) -> ProviderMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProviderMetrics
impl Debug for ProviderMetrics
Auto Trait Implementations§
impl Freeze for ProviderMetrics
impl RefUnwindSafe for ProviderMetrics
impl Send for ProviderMetrics
impl Sync for ProviderMetrics
impl Unpin for ProviderMetrics
impl UnwindSafe for ProviderMetrics
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