pub struct StatsCollector {
pub start_time: Instant,
pub file_changes: usize,
pub watcher_calls: usize,
pub last_memory_usage: u64,
pub last_cpu_usage: f32,
/* private fields */
}Expand description
Stats collector for Flash performance metrics
Fields§
§start_time: Instant§file_changes: usize§watcher_calls: usize§last_memory_usage: u64§last_cpu_usage: f32Implementations§
Source§impl StatsCollector
impl StatsCollector
pub fn new() -> Self
pub fn record_file_change(&mut self)
pub fn record_watcher_call(&mut self)
pub fn update_resource_usage(&mut self)
pub fn display_stats(&self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StatsCollector
impl RefUnwindSafe for StatsCollector
impl Send for StatsCollector
impl Sync for StatsCollector
impl Unpin for StatsCollector
impl UnwindSafe for StatsCollector
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> 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