pub struct CpuCollector {
pid: Option<i32>,
prev: Option<Snapshot>,
cpu_source: CpuSource,
cfs_quota: CfsQuota,
effective_cores: f64,
carried_forward: HashSet<i32>,
}Fields§
§pid: Option<i32>Root PID of the process tree to track. None = system-only metrics.
prev: Option<Snapshot>§cpu_source: CpuSourceDetected CPU accounting source for system-level utilization.
cfs_quota: CfsQuotaCFS quota limit (None = unlimited).
effective_cores: f64Effective number of cores for this environment. Respects CFS quota: min(physical_cores, quota_cores).
carried_forward: HashSet<i32>PIDs whose prev entries were carried forward from the previous
interval (their /proc/PID/stat read failed). Limited to one
hop so dead PIDs don’t accumulate and inflate the exited correction.
Implementations§
Auto Trait Implementations§
impl Freeze for CpuCollector
impl RefUnwindSafe for CpuCollector
impl Send for CpuCollector
impl Sync for CpuCollector
impl Unpin for CpuCollector
impl UnsafeUnpin for CpuCollector
impl UnwindSafe for CpuCollector
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