pub struct Sample {
pub timestamp_secs: u64,
pub job_name: Option<String>,
pub tracked_pid: Option<i32>,
pub cpu: CpuMetrics,
pub memory: MemoryMetrics,
pub network: Vec<NetworkMetrics>,
pub disk: Vec<DiskMetrics>,
pub gpu: Vec<GpuMetrics>,
}Expand description
A single point-in-time observation of all tracked resources.
Fields§
§timestamp_secs: u64Unix timestamp (seconds) when this sample was taken.
job_name: Option<String>Optional job label supplied via CLI or config file.
tracked_pid: Option<i32>Root PID of the process tree being tracked, if any.
Carried here so the CSV serializer can emit process_pid without
needing access to Config.
cpu: CpuMetrics§memory: MemoryMetrics§network: Vec<NetworkMetrics>§disk: Vec<DiskMetrics>§gpu: Vec<GpuMetrics>One entry per detected GPU/NPU/TPU. Empty on CPU-only hosts.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Sample
impl<'de> Deserialize<'de> for Sample
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnsafeUnpin for Sample
impl UnwindSafe for Sample
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