Up

Module Cpu_usage = Async_extra.Cpu_usage

Signature

module Sampler : sig .. end

Returns a pipe of samples as described above, one per second.

Pushback is not honored on the pipe and the pipe will grow unbounded in memory if it is not read from.

module Summary : sig .. end

Get summarized cpu usage. Each window is the duration over which the summary should be calculated. The underlying data structure adapts to keep a sufficiently large history of samples to calculate summaries for all windows. The pipe will deliver one update per window per second. Window durations are rounded up to the nearest second.

Pushback is not honored on the pipe and the pipe will grow unbounded in memory if it is not read from.