pub fn snapshot(store: &impl ProcessStore)Expand description
Snapshot all running processes from /proc.
Populates the store. Call once at startup before processing events.
use proc_tree::{DefaultStore, snapshot, ProcessStore};
let store = DefaultStore::new(600);
snapshot(&store);
// PID 1 should always exist on Linux
assert!(store.get_process(1).is_some());