Skip to main content

Module controller

Module controller 

Source
Expand description

Feedback controller for the adaptive I/O profiles.

The controller is a pure state machine: (state, epoch measurement) → (state, actions). It never touches a clock or a device itself — epochs are byte-based (every N input bytes) and durations arrive as data, which is what makes every decision reproducible in tests with a mock clock. See docs/features/ADAPTIVE_IO_PROFILES.md for the full design.

Structs§

Controller
The adaptive-profile state machine, evaluated at epoch boundaries.
EpochDecision
What the splitter should do after an epoch boundary.
EpochMeasurement
What the pipeline observed during one byte-based epoch.
MockClock
Deterministic Clock for tests: every now() call advances time by a fixed step, so a pipeline that samples the clock once per epoch boundary sees identical epoch durations on every machine, every run.
RealClock
Wall-clock Clock backed by std::time::Instant.

Traits§

Clock
Monotonic time source for epoch measurements.