monitrs-core 1.0.0

Platform-neutral data model, rate engine, history ring, and diagnostics for monitrs
Documentation

Platform-neutral core of monitrs: the data model, the rate engine, the bounded history ring, process list logic, and the diagnostic engine.

Dependency direction

This crate depends on no terminal library and no OS collector (§10.1). It cannot know how /proc is parsed, and it cannot know how a process row is coloured. Everything here is testable from fixtures with no live system.

Invariants worth stating once

  • Unavailable is not zero. Any metric an OS may withhold is wrapped in [model::MetricState], and there is no API that turns an unavailable metric into a number (§4, §26).
  • Stale is not current. A retained value can only be read together with its age (§26).
  • The first sample of delta-based data is warming up, not zero (§8.2).
  • A PID is not an identity. [model::ProcessIdentity] pairs the PID with a start key so PID reuse is detectable (§26).
  • Monotonic time for rates and ordering, wall-clock for display only (§8.1).
  • Raw counters and timestamps are integral; only calculated percentages and rates use floating point, and both validate at construction (§10.4).