pub fn pressure() -> Result<Option<Pressure>>Expand description
How much time tasks were stalled on I/O (Pressure). Linux: the cgroup’s
io.pressure, else /proc/pressure/io. macOS and Windows: None.
use sys_lib::{self as sys, PressureLevel};
if let Some(p) = sys::disk::pressure()? {
if p.level >= PressureLevel::Warning { /* postpone compaction */ }
}§Errors
Malformed when the kernel’s file does not parse.