Turns a monotonically increasing byte counter (e.g. /proc/diskstats sectors
or /proc/net/dev bytes) into a per-second rate.
The first observation has no baseline, and a reboot resets the counter
backwards; both cases return :skip (carrying the new baseline) rather than a
meaningless or negative rate. mono_ms must come from System.monotonic_time/1.
Summary
Functions
Given the previous state, the latest cumulative count, and the monotonic
timestamp mono_ms of this reading, return the rate in counter-units per
second together with the new state.
Types
@type state() :: {non_neg_integer(), integer()} | nil
Functions
Given the previous state, the latest cumulative count, and the monotonic
timestamp mono_ms of this reading, return the rate in counter-units per
second together with the new state.