pub struct EncodingAnalyzer {
pub stats: EncodingStatistics,
/* private fields */
}Expand description
Encoding performance analyzer
Fields§
§stats: EncodingStatisticsEncoding operation statistics
Implementations§
Source§impl EncodingAnalyzer
impl EncodingAnalyzer
Sourcepub fn record_encoding(
&mut self,
data_type: &'static str,
bytes: usize,
duration_us: u64,
)
pub fn record_encoding( &mut self, data_type: &'static str, bytes: usize, duration_us: u64, )
Record an encoding operation
Sourcepub fn record_decoding(
&mut self,
_data_type: &'static str,
bytes: usize,
duration_us: u64,
)
pub fn record_decoding( &mut self, _data_type: &'static str, bytes: usize, duration_us: u64, )
Record a decoding operation
Sourcepub fn record_error(&mut self, error: EncodingError)
pub fn record_error(&mut self, error: EncodingError)
Record an encoding error
Sourcepub fn get_encoding_throughput(&self) -> f64
pub fn get_encoding_throughput(&self) -> f64
Get encoding throughput (bytes per second)
Sourcepub fn get_decoding_throughput(&self) -> f64
pub fn get_decoding_throughput(&self) -> f64
Get decoding throughput (bytes per second)
Sourcepub fn get_top_errors(&self, limit: usize) -> Vec<(&EncodingError, u32)>
pub fn get_top_errors(&self, limit: usize) -> Vec<(&EncodingError, u32)>
Get most common errors
Trait Implementations§
Source§impl Debug for EncodingAnalyzer
impl Debug for EncodingAnalyzer
Source§impl Default for EncodingAnalyzer
impl Default for EncodingAnalyzer
Source§fn default() -> EncodingAnalyzer
fn default() -> EncodingAnalyzer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EncodingAnalyzer
impl RefUnwindSafe for EncodingAnalyzer
impl Send for EncodingAnalyzer
impl Sync for EncodingAnalyzer
impl Unpin for EncodingAnalyzer
impl UnsafeUnpin for EncodingAnalyzer
impl UnwindSafe for EncodingAnalyzer
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