pub struct Metrics {
pub cpu_percent: Option<f64>,
pub ram_percent: Option<f64>,
pub disk_percent: Option<f64>,
pub uptime: Option<String>,
pub load_avg: Option<String>,
pub os_info: Option<String>,
pub top_processes: Option<Vec<ProcessInfo>>,
pub last_updated: Instant,
}Expand description
Live metrics collected from a remote server.
Fields§
§cpu_percent: Option<f64>§ram_percent: Option<f64>§disk_percent: Option<f64>§uptime: Option<String>§load_avg: Option<String>§os_info: Option<String>OS information (e.g., “Ubuntu 22.04 LTS”, “Debian GNU/Linux 11”).
top_processes: Option<Vec<ProcessInfo>>Top processes by CPU usage (at most 3).
last_updated: InstantWhen these metrics were last successfully collected.
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 UnsafeUnpin 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