Skip to main content

parse_taskstats

Function parse_taskstats 

Source
pub fn parse_taskstats(buf: &[u8]) -> Option<DelayStats>
Expand description

Parse a struct taskstats blob into the four fields that are read.

Split out from the socket code so it can be unit-tested against a synthetic buffer: the offsets are a kernel ABI and a wrong one would produce a plausible but wrong percentage, which no live test would catch on an idle machine.