Expand description
Process-level resource reads (ADR-103 Stage 1).
Cumulative CPU time and RSS via getrusage(2), used by the daemon’s
phase-span logging (background-task start/completion/cancellation) and
the comm.health resource self-report. libc is already a workspace
dependency (used elsewhere in this crate for flock/kill), so this
reuses it rather than adding a new one, per ADR-103 Stage 1’s preference
for a small std/libc-based read over a dedicated sysinfo-style crate.
Structs§
- Process
Resource Usage - A point-in-time snapshot of this process’s cumulative resource usage.
Functions§
- cpu_
delta_ us - CPU time consumed strictly between two
ProcessResourceUsagesnapshots, in microseconds. - process_
resource_ usage - Read this process’s cumulative CPU time and RSS via
getrusage(RUSAGE_SELF).