pub struct PowerStats {
pub wakeups: u64,
pub operations: u64,
pub delay_time: Duration,
}Expand description
Power statistics tracker
Fields§
§wakeups: u64Number of CPU wake-ups (batch flushes)
operations: u64Number of operations batched
delay_time: DurationTotal time spent in batched delays
Implementations§
Source§impl PowerStats
impl PowerStats
Sourcepub fn record_batch(&mut self, ops: usize, delay: Duration)
pub fn record_batch(&mut self, ops: usize, delay: Duration)
Record a batch operation
Sourcepub fn avg_ops_per_wakeup(&self) -> f64
pub fn avg_ops_per_wakeup(&self) -> f64
Get average operations per wake-up
Sourcepub fn power_saving_ratio(&self) -> f64
pub fn power_saving_ratio(&self) -> f64
Get power saving ratio (higher is better)
This estimates how much we’ve reduced wake-ups compared to processing each operation individually.
Trait Implementations§
Source§impl Clone for PowerStats
impl Clone for PowerStats
Source§fn clone(&self) -> PowerStats
fn clone(&self) -> PowerStats
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 PowerStats
impl Debug for PowerStats
Source§impl Default for PowerStats
impl Default for PowerStats
Source§fn default() -> PowerStats
fn default() -> PowerStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PowerStats
impl RefUnwindSafe for PowerStats
impl Send for PowerStats
impl Sync for PowerStats
impl Unpin for PowerStats
impl UnwindSafe for PowerStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more