pub struct PerformanceMetrics {
pub speed: SpeedTier,
pub quality: QualityTier,
pub avg_response_time: Option<Duration>,
pub throughput: Option<f64>,
}
Expand description
Performance metrics for models
Fields§
§speed: SpeedTier
Speed tier classification
quality: QualityTier
Quality tier classification
avg_response_time: Option<Duration>
Average response time
throughput: Option<f64>
Throughput (requests per second)
Implementations§
Source§impl PerformanceMetrics
impl PerformanceMetrics
Sourcepub fn with_speed(self, speed: SpeedTier) -> Self
pub fn with_speed(self, speed: SpeedTier) -> Self
Set speed tier
Sourcepub fn with_quality(self, quality: QualityTier) -> Self
pub fn with_quality(self, quality: QualityTier) -> Self
Set quality tier
Sourcepub fn with_avg_response_time(self, time: Duration) -> Self
pub fn with_avg_response_time(self, time: Duration) -> Self
Set average response time
Sourcepub fn with_throughput(self, tps: f64) -> Self
pub fn with_throughput(self, tps: f64) -> Self
Set throughput
Trait Implementations§
Source§impl Clone for PerformanceMetrics
impl Clone for PerformanceMetrics
Source§fn clone(&self) -> PerformanceMetrics
fn clone(&self) -> PerformanceMetrics
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 PerformanceMetrics
impl Debug for PerformanceMetrics
Source§impl Default for PerformanceMetrics
impl Default for PerformanceMetrics
Source§impl<'de> Deserialize<'de> for PerformanceMetrics
impl<'de> Deserialize<'de> for PerformanceMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PerformanceMetrics
impl RefUnwindSafe for PerformanceMetrics
impl Send for PerformanceMetrics
impl Sync for PerformanceMetrics
impl Unpin for PerformanceMetrics
impl UnwindSafe for PerformanceMetrics
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