Skip to main content

Module resource

Module resource 

Source
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§

ProcessResourceUsage
A point-in-time snapshot of this process’s cumulative resource usage.

Functions§

cpu_delta_us
CPU time consumed strictly between two ProcessResourceUsage snapshots, in microseconds.
process_resource_usage
Read this process’s cumulative CPU time and RSS via getrusage(RUSAGE_SELF).