#[repr(align(64))]pub struct SystemHealth { /* private fields */ }
Expand description
System health monitor with process introspection
Tracks both system-wide and process-specific resource usage. Cache-line aligned for maximum performance.
Implementations§
Source§impl SystemHealth
impl SystemHealth
Sourcepub fn with_interval(interval: Duration) -> Self
pub fn with_interval(interval: Duration) -> Self
Create with custom update interval
Sourcepub fn mem_used_mb(&self) -> f64
pub fn mem_used_mb(&self) -> f64
Get system memory usage in MB
Sourcepub fn mem_used_gb(&self) -> f64
pub fn mem_used_gb(&self) -> f64
Get system memory usage in GB
Sourcepub fn process_cpu_used(&self) -> f64
pub fn process_cpu_used(&self) -> f64
Get process CPU usage percentage
Sourcepub fn process_mem_used_mb(&self) -> f64
pub fn process_mem_used_mb(&self) -> f64
Get process memory usage in MB
Sourcepub fn thread_count(&self) -> u32
pub fn thread_count(&self) -> u32
Get process thread count
Sourcepub fn health_score(&self) -> f64
pub fn health_score(&self) -> f64
Get overall system health score (0.0-100.0)
Sourcepub fn quick_check(&self) -> HealthStatus
pub fn quick_check(&self) -> HealthStatus
Quick health check - sub-microsecond if cached
Sourcepub fn snapshot(&self) -> SystemSnapshot
pub fn snapshot(&self) -> SystemSnapshot
Get detailed system snapshot
Sourcepub fn process(&self) -> ProcessStats
pub fn process(&self) -> ProcessStats
Get process-specific statistics
Trait Implementations§
Source§impl Debug for SystemHealth
impl Debug for SystemHealth
Source§impl Default for SystemHealth
impl Default for SystemHealth
Source§impl Display for SystemHealth
impl Display for SystemHealth
impl Send for SystemHealth
impl Sync for SystemHealth
Auto Trait Implementations§
impl !Freeze for SystemHealth
impl RefUnwindSafe for SystemHealth
impl Unpin for SystemHealth
impl UnwindSafe for SystemHealth
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