Skip to main content

process_usage_with_threads

Function process_usage_with_threads 

Source
pub fn process_usage_with_threads() -> Result<ProcessThreads>
Expand description

Resource usage of the current process and its per-thread breakdown, from one snapshot.

More expensive than process_usage (it opens each thread to read its name and start address), so it is for benches and diagnosis. A thread that exits while the names are read keeps its counters and has no name. Fails when the host cannot list threads (Windows when the process table is unreadable, other Unix targets with ErrorKind::Unsupported).