Module hardware

Module hardware 

Source
Expand description

2026-09-26: The hardware fingerprint: which box a benchmark number was measured on, and the box-class key gate baselines are indexed by.

  • Hardware names the box. A gate record’s copy comes from the serving endpoint’s /hardware (http::fetch_hardware), so it describes the serving box even when the benchmark CLI runs elsewhere; Hardware::probe reads the local box.
  • state::HardwareState records the box’s state. The executor collects it before a run and, unless that capture fails or the pre-check refuses the run, after; policy decides what is gated on it.

Owner: bench (hardware). Invariants:

Re-exports§

pub use policy::Decision;
pub use policy::Sensitivity;
pub use policy::Validity;
pub use report::HardwareStateReport;
pub use state::HardwareState;
pub use state::HardwareStateDelta;

Modules§

collect
2026-09-26: The I/O half of the hardware-state collector: run nvidia-smi, read procfs and sysfs, and hand the text to super::parse, which does the interpreting.
energy
2026-09-26: In-window GPU energy, the pure half: integrate the power readings that super::energy_sampler streams and turn a measured window into record keys.
energy_sampler
2026-09-26: The I/O half of in-window energy: one long-lived nvidia-smi -lms child whose lines a background task parses, plus the per-run EnergyMeter.
equivalence
2026-09-26: Whether two boxes count as one box for Speed-class numbers: same GPU name and driver major, clock ceiling and memory within the class’s spreads, no thermal throttle reason asserted, and hottest chassis zones within its delta.
ids
2026-09-26: Box-class ids, the strings a gate baseline is keyed by, and the map from a GPU’s reported name to its id.
limits
2026-09-26: A hardware class’s benchmark limits: the numbers certification and the hardware policies judge a box by, declared in kernels/<hw>/HARDWARE.toml under [benchmarks.limits].
parse
2026-09-26: Pure parsers for the nvidia-smi, procfs and sysfs text that super::collect reads.
policy
2026-09-26: The hardware verdicts: may a benchmark start (precheck), and may the numbers of a finished run be believed (postcheck).
report
2026-09-26: HardwareStateReport: the two captures, the delta and both verdicts, as one value that travels with the run into its gate record (GateRecord::hardware_state, .benchmarks/<id>/<date>-<sha>.json).
state
2026-09-26: HardwareState, what the box was doing at one instant, and HardwareStateDelta, what changed between the captures before and after a run.
throttle_monitor
2026-09-26: How much of each recent interval the clocks spent throttled, from successive ThrottleCounters reads (used by the TUI, tui/data/thermal.rs).

Structs§

Hardware
2026-09-26: A box’s fingerprint, as its serving endpoint reported it or as Hardware::probe read it.