#[non_exhaustive]pub struct TreeReading {
pub cpu_ms: u64,
pub memory_bytes: u64,
pub memory_kind: ChildMemoryKind,
pub process_count: u64,
pub source: TreeSource,
pub bound: Option<ResourceBound>,
pub own: Option<TreeOwn>,
pub groups: Vec<ProcessGroup>,
}Expand description
Cumulative CPU and current memory of a module and its descendants.
Construct with TreeReading::new and its builders, not a struct literal.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cpu_ms: u64§memory_bytes: u64§memory_kind: ChildMemoryKind§process_count: u64§source: TreeSource§bound: Option<ResourceBound>Absent means exact. Memory and process count are not CPU bounds.
own: Option<TreeOwn>The root process’s attributed share, omitted when unknown. Its CPU is funded from initial measured CPU and later progress, not its raw counter. Its bound follows the row’s CPU bound.
groups: Vec<ProcessGroup>Up to eight child-only program groups by memory, excluding the root identity but retaining children with the same name. Absent means none. Unreadable members invalidate the whole reading, not an empty collection.
Implementations§
Source§impl TreeReading
impl TreeReading
Sourcepub fn new(
cpu_ms: u64,
memory_bytes: u64,
memory_kind: ChildMemoryKind,
process_count: u64,
source: TreeSource,
) -> Self
pub fn new( cpu_ms: u64, memory_bytes: u64, memory_kind: ChildMemoryKind, process_count: u64, source: TreeSource, ) -> Self
Create a measured tree without optional root, group or bound metadata.
Sourcepub fn with_bound(self, bound: Option<ResourceBound>) -> Self
pub fn with_bound(self, bound: Option<ResourceBound>) -> Self
Set or clear the cumulative CPU lower-bound marker.
Sourcepub fn with_own(self, own: Option<TreeOwn>) -> Self
pub fn with_own(self, own: Option<TreeOwn>) -> Self
Set or clear the root’s attributed resource share.
Sourcepub fn with_groups(self, groups: Vec<ProcessGroup>) -> Self
pub fn with_groups(self, groups: Vec<ProcessGroup>) -> Self
Replace the live child-only program groups; an empty list clears them.