pub struct MetricHistory {
pub cpu: History,
pub memory: History,
pub gpus: Vec<History>,
pub net_rx: History,
pub net_tx: History,
pub net_interface: Option<String>,
}Expand description
Graph histories of one host, updated from each snapshot.
Fields§
§cpu: HistoryTotal CPU usage (%).
memory: HistoryUsed memory (% of total).
gpus: Vec<History>Utilization (%) per GPU index.
net_rx: HistoryReceive rate of net_interface (bytes/s).
net_tx: HistoryTransmit rate of net_interface (bytes/s).
net_interface: Option<String>Interface whose traffic is recorded (None: chosen on the next snapshot).
Implementations§
Source§impl MetricHistory
impl MetricHistory
Sourcepub fn select_interface(&mut self, name: &str)
pub fn select_interface(&mut self, name: &str)
Switches the recorded network interface, clearing its history.
Sourcepub fn next_interface(&mut self, snapshot: &Snapshot) -> Option<String>
pub fn next_interface(&mut self, snapshot: &Snapshot) -> Option<String>
Switches to the interface after the current one in snapshot and
returns its name.
Trait Implementations§
Source§impl Clone for MetricHistory
impl Clone for MetricHistory
Source§impl Debug for MetricHistory
impl Debug for MetricHistory
Auto Trait Implementations§
impl Freeze for MetricHistory
impl RefUnwindSafe for MetricHistory
impl Send for MetricHistory
impl Sync for MetricHistory
impl Unpin for MetricHistory
impl UnsafeUnpin for MetricHistory
impl UnwindSafe for MetricHistory
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