pub struct SemanticCacheStats {
pub avg_similarity_score: f64,
pub cost_saved: f64,
pub hit_rate: f64,
pub tokens_saved: i64,
pub total_hits: i64,
pub total_misses: i64,
}Fields§
§avg_similarity_score: f64Average similarity score for cache hits
cost_saved: f64Total cost saved from cache hits
hit_rate: f64Cache hit rate as a percentage
tokens_saved: i64Total tokens saved from cache hits
total_hits: i64Total number of cache hits
total_misses: i64Total number of cache misses
Implementations§
Trait Implementations§
Source§impl Clone for SemanticCacheStats
impl Clone for SemanticCacheStats
Source§fn clone(&self) -> SemanticCacheStats
fn clone(&self) -> SemanticCacheStats
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 SemanticCacheStats
impl Debug for SemanticCacheStats
Source§impl Default for SemanticCacheStats
impl Default for SemanticCacheStats
Source§fn default() -> SemanticCacheStats
fn default() -> SemanticCacheStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SemanticCacheStats
impl<'de> Deserialize<'de> for SemanticCacheStats
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
Source§impl PartialEq for SemanticCacheStats
impl PartialEq for SemanticCacheStats
Source§impl Serialize for SemanticCacheStats
impl Serialize for SemanticCacheStats
impl StructuralPartialEq for SemanticCacheStats
Auto Trait Implementations§
impl Freeze for SemanticCacheStats
impl RefUnwindSafe for SemanticCacheStats
impl Send for SemanticCacheStats
impl Sync for SemanticCacheStats
impl Unpin for SemanticCacheStats
impl UnwindSafe for SemanticCacheStats
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