pub struct SyncStatistics {Show 19 fields
pub total_files: usize,
pub files_synced: usize,
pub files_skipped: usize,
pub files_failed: usize,
pub conflicts: usize,
pub total_bytes: u64,
pub transferred_bytes: u64,
pub average_speed: f64,
pub max_speed: f64,
pub min_speed: f64,
pub duration_seconds: f64,
pub total_retries: u32,
pub encrypted_files: usize,
pub chunked_files: usize,
pub verified_files: usize,
pub verification_failed: usize,
pub file_type_stats: HashMap<FileType, FileTypeStats>,
pub operation_stats: HashMap<FileOperation, usize>,
pub transfer_rate: f64,
}Expand description
同步统计信息
Fields§
§total_files: usize总文件数
files_synced: usize成功同步的文件数
files_skipped: usize跳过的文件数
files_failed: usize失败的文件数
conflicts: usize冲突的文件数
total_bytes: u64总字节数
transferred_bytes: u64已传输的字节数
average_speed: f64平均传输速率(字节/秒)
max_speed: f64最大传输速率(字节/秒)
min_speed: f64最小传输速率(字节/秒)
duration_seconds: f64总耗时(秒)
total_retries: u32重试总次数
encrypted_files: usize加密文件数
chunked_files: usize分块传输的文件数
verified_files: usize校验和验证的文件数
verification_failed: usize校验和失败的文件数
file_type_stats: HashMap<FileType, FileTypeStats>按文件类型统计
operation_stats: HashMap<FileOperation, usize>按操作类型统计
transfer_rate: f64Implementations§
Source§impl SyncStatistics
impl SyncStatistics
pub fn new() -> Self
pub fn add_file_result(&mut self, result: &FileSyncResult)
pub fn update_speed_metrics(&mut self, speed: f64)
pub fn finalize(&mut self, duration: f64)
pub fn success_rate(&self) -> f64
pub fn failure_rate(&self) -> f64
pub fn skip_rate(&self) -> f64
pub fn verification_success_rate(&self) -> f64
pub fn average_file_size(&self) -> f64
pub fn human_readable_total_bytes(&self) -> String
pub fn human_readable_transferred_bytes(&self) -> String
pub fn human_readable_average_speed(&self) -> String
pub fn summary(&self) -> String
pub fn detailed_report(&self) -> String
Trait Implementations§
Source§impl Clone for SyncStatistics
impl Clone for SyncStatistics
Source§fn clone(&self) -> SyncStatistics
fn clone(&self) -> SyncStatistics
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 SyncStatistics
impl Debug for SyncStatistics
Source§impl Default for SyncStatistics
impl Default for SyncStatistics
Source§fn default() -> SyncStatistics
fn default() -> SyncStatistics
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SyncStatistics
impl<'de> Deserialize<'de> for SyncStatistics
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 SyncStatistics
impl RefUnwindSafe for SyncStatistics
impl Send for SyncStatistics
impl Sync for SyncStatistics
impl Unpin for SyncStatistics
impl UnwindSafe for SyncStatistics
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