#[non_exhaustive]pub struct AgentCommandResources {
pub measured_at_ms: Option<u64>,
pub module_id: String,
pub cpu_ms: u64,
pub memory_bytes: u64,
pub process_count: u64,
pub bound: Option<ResourceBound>,
pub unmeasured_finished: Option<u64>,
pub groups: Vec<ProcessGroup>,
pub cpu_last_hour: Option<CpuLastHour>,
}Expand description
Commands attributed to agents rather than to the module that launches them.
Construct with AgentCommandResources::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.measured_at_ms: Option<u64>Unix-epoch milliseconds of these command measurements, not the reply time.
module_id: String§cpu_ms: u64§memory_bytes: u64§process_count: u64§bound: Option<ResourceBound>§unmeasured_finished: Option<u64>Accepted commands that finished before any successful CPU measurement. Their CPU remains in the module row, not a fabricated agents zero.
groups: Vec<ProcessGroup>Absent means no live program groups, never unreadable members.
cpu_last_hour: Option<CpuLastHour>Implementations§
Source§impl AgentCommandResources
impl AgentCommandResources
Sourcepub fn with_measured_at_ms(self, measured_at_ms: Option<u64>) -> Self
pub fn with_measured_at_ms(self, measured_at_ms: Option<u64>) -> Self
Set or clear the measurement’s Unix-epoch millisecond timestamp.
Sourcepub fn new(
module_id: impl Into<String>,
cpu_ms: u64,
memory_bytes: u64,
process_count: u64,
) -> Self
pub fn new( module_id: impl Into<String>, cpu_ms: u64, memory_bytes: u64, process_count: u64, ) -> Self
Create measured command totals without optional attribution 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_unmeasured_finished(self, unmeasured_finished: Option<u64>) -> Self
pub fn with_unmeasured_finished(self, unmeasured_finished: Option<u64>) -> Self
Set or clear the count of finished commands whose CPU was unmeasured.
Sourcepub fn with_groups(self, groups: Vec<ProcessGroup>) -> Self
pub fn with_groups(self, groups: Vec<ProcessGroup>) -> Self
Replace live command program groups; an empty list clears them.
Sourcepub fn with_cpu_last_hour(self, cpu_last_hour: Option<CpuLastHour>) -> Self
pub fn with_cpu_last_hour(self, cpu_last_hour: Option<CpuLastHour>) -> Self
Set or clear retained hourly CPU attributed to commands.