Function sample_current_process

Source
pub fn sample_current_process() -> Result<ProcessResourceSnapshot, ProcessSampleError>
Expand description

Samples the current process from the operating system’s process interface.

§Errors

Propagates sample_process errors for the current process ID.

§Examples

let snapshot = ailloli_ui_bench::sample_current_process()?;
assert!(snapshot.rss_bytes() > 0);