pub struct OperationMetrics {
pub compression_time_micros: u64,
pub compression_ratio: f64,
pub checksum_time_micros: u64,
pub encryption_time_micros: Option<u64>,
pub hardware_accelerated: bool,
}Expand description
Operation metrics for visibility into Rust layer performance
Fields§
§compression_time_micros: u64Compression operation time in microseconds (0 if not performed)
compression_ratio: f64Compression ratio (original_size / compressed_size, >1.0 means compression helped)
checksum_time_micros: u64Checksum (xxHash3-64) operation time in microseconds
encryption_time_micros: Option<u64>Encryption operation time in microseconds (None if not performed)
hardware_accelerated: boolWhether hardware acceleration was used (for SHA, AES, etc.)
Implementations§
Source§impl OperationMetrics
impl OperationMetrics
Sourcepub fn with_compression(
self,
time_micros: u64,
original_size: usize,
compressed_size: usize,
) -> Self
pub fn with_compression( self, time_micros: u64, original_size: usize, compressed_size: usize, ) -> Self
Set compression metrics
Sourcepub fn with_checksum(self, time_micros: u64) -> Self
pub fn with_checksum(self, time_micros: u64) -> Self
Set checksum metrics
Sourcepub fn with_encryption(self, time_micros: u64, hw_accel: bool) -> Self
pub fn with_encryption(self, time_micros: u64, hw_accel: bool) -> Self
Set encryption metrics
Sourcepub fn total_time_micros(&self) -> u64
pub fn total_time_micros(&self) -> u64
Total operation time in microseconds
Trait Implementations§
Source§impl Clone for OperationMetrics
impl Clone for OperationMetrics
Source§fn clone(&self) -> OperationMetrics
fn clone(&self) -> OperationMetrics
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 OperationMetrics
impl Debug for OperationMetrics
Source§impl Default for OperationMetrics
impl Default for OperationMetrics
Source§impl<'de> Deserialize<'de> for OperationMetrics
impl<'de> Deserialize<'de> for OperationMetrics
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 OperationMetrics
impl RefUnwindSafe for OperationMetrics
impl Send for OperationMetrics
impl Sync for OperationMetrics
impl Unpin for OperationMetrics
impl UnwindSafe for OperationMetrics
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