Skip to main content

sample_peak_rss

Function sample_peak_rss 

Source
pub fn sample_peak_rss(label: &'static str)
Expand description

Convenience wrapper: sample the process’s current resident set (not peak) via task_info on macOS / /proc/self/statm on Linux and push it into the probe event buffer under the given label.

Using current RSS (not getrusage.ru_maxrss) is essential so that allocator purges are visible — peak RSS only moves up. Name kept as sample_peak_rss for backwards compatibility with existing checkpoint labels; semantically it is “sample current”.