pub fn snapshot(record_bytes: u64) -> Result<Snapshot, SamplingError>Expand description
Observe process leaders using Linux /proc or the macOS native ps table.
record_bytes bounds each Linux stat record. Consumers own sampling cadence,
workload selection and total snapshot memory; no elapsed-time deadline is set.
Processes that disappear or deny stat access during Linux enumeration are skipped.
macOS ps RSS uses 1024-byte units, independently of native memory page size.
ยงErrors
Returns native I/O, command, malformed-record or checked-arithmetic failures.