pub fn snapshot_worker_allocated(
metrics: &PayloadMetrics,
snap_idx: usize,
worker_tid: i32,
) -> ThreadLookupExpand description
Extract snapshots.{snap_idx}.threads[*].allocated_bytes for the
thread whose tid matches worker_tid. Returns ThreadLookup
so callers distinguish “tid absent” from “cap hit before tid
seen” from “allocated_bytes sibling missing” — parallel to
lookup_thread, which covers the single-snapshot path.