pub struct TranslationStats {
pub texts_collected: usize,
pub texts_filtered: usize,
pub cache_hits: usize,
pub cache_misses: usize,
pub batches_created: usize,
pub processing_time: Duration,
pub api_calls: usize,
pub errors: usize,
}Expand description
翻译统计信息
Fields§
§texts_collected: usize收集到的文本数量
texts_filtered: usize过滤后的文本数量
cache_hits: usize缓存命中次数
cache_misses: usize缓存未命中次数
batches_created: usize创建的批次数量
processing_time: Duration处理时间
api_calls: usizeAPI调用次数
errors: usize错误次数
Implementations§
Source§impl TranslationStats
impl TranslationStats
Sourcepub fn cache_hit_rate(&self) -> f32
pub fn cache_hit_rate(&self) -> f32
计算缓存命中率
Sourcepub fn average_batch_size(&self) -> f32
pub fn average_batch_size(&self) -> f32
计算平均批次大小
Trait Implementations§
Source§impl Clone for TranslationStats
impl Clone for TranslationStats
Source§fn clone(&self) -> TranslationStats
fn clone(&self) -> TranslationStats
Returns a copy 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 TranslationStats
impl Debug for TranslationStats
Source§impl Default for TranslationStats
impl Default for TranslationStats
Source§fn default() -> TranslationStats
fn default() -> TranslationStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TranslationStats
impl RefUnwindSafe for TranslationStats
impl Send for TranslationStats
impl Sync for TranslationStats
impl Unpin for TranslationStats
impl UnwindSafe for TranslationStats
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