pub fn resource_delta(
before: &BTreeMap<String, ProcessSample>,
after: &BTreeMap<String, ProcessSample>,
clock_ticks_per_second: u32,
) -> Result<(f64, u64), String>Expand description
Broker CPU seconds and summed peak RSS bytes between two snapshots.
§Errors
Returns the failure reason when the two snapshots name different pods, or a pod’s process start time or CPU counter differs in a way one process cannot produce. Each means a broker process was replaced during the trial, so its numbers describe no single process. A restarted container keeps its pod name, so the start time is what catches it.