Module sampler

Module sampler 

Source
Expand description

2026-09-26: The device sampler thread, the I/O half of L0 and energy. It reads a DeviceSource at the configured period and hands each reading to Telemetry::absorb_device. It runs on its own thread, so a slow driver call delays the next sample, not a scheduler step.

Owner: telemetry. Invariants: stopping or dropping a SamplerHandle stops its thread and joins it.

Structs§

SamplerHandle
2026-09-26: A running sampler. Dropping it stops the thread and joins it.

Functions§

spawn
2026-09-26: Sample source into t every period until stopped.
start
2026-09-26: Configure t and, for a level that samples, start the NVML sampler.
start_with
2026-09-26: start over an explicit device opener.