pub struct Metrics { /* private fields */ }
Expand description
Metrics for the Lepton JPEG compression and decompression process.
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn record_compression_stats(
&mut self,
cmp: ModelComponent,
total_bits: i64,
total_compressed: i64,
)
pub fn record_compression_stats( &mut self, cmp: ModelComponent, total_bits: i64, total_compressed: i64, )
Records the compression statistics for a specific model component.
Sourcepub fn record_cpu_worker_time(&mut self, duration: Duration)
pub fn record_cpu_worker_time(&mut self, duration: Duration)
Records the CPU worker time for the compression process.
Sourcepub fn print_metrics(&self)
pub fn print_metrics(&self)
Returns the total number of bits processed for a specific model component.
Sourcepub fn get_cpu_time_worker_time(&self) -> Duration
pub fn get_cpu_time_worker_time(&self) -> Duration
Returns the total CPU worker time recorded in the metrics.
Sourcepub fn merge_from(&mut self, source_metrics: Metrics)
pub fn merge_from(&mut self, source_metrics: Metrics)
Merges another Metrics instance into this one, summing the statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
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
Source§impl<T> DefaultBoxed for Twhere
T: Default,
impl<T> DefaultBoxed for Twhere
T: Default,
Source§unsafe fn default_in_place(ptr: *mut T)
unsafe fn default_in_place(ptr: *mut T)
Fill the given memory location with default value. Read more
Source§fn default_boxed() -> Box<Self>where
Self: Sized,
fn default_boxed() -> Box<Self>where
Self: Sized,
Create a boxed instance with default value for each field.