Expand description
2026-09-26: Pure parsers for the nvidia-smi, procfs and sysfs text that
super::collect reads.
Owner: bench hardware. Invariants:
&strin, data out: no I/O, so the fixtures infixtures/exercise every parser.- A number that does not parse is
None, or its row or zone is dropped; no parser substitutes a default, so a caller can tell “0 µs of throttling” from “no idea”.
Structs§
- GpuQuery
- 2026-09-26: The first non-blank CSV row of
--query-gpu=name,driver_version,clocks.sm,clocks.max.sm,temperature.gpu,persistence_modewith--format=csv,noheader,nounits. - MemInfo
- 2026-09-26:
MemTotal,MemAvailableandCachedfrom/proc/meminfo, kB.
Functions§
- compute_
apps - 2026-09-26: The rows of
--query-compute-apps=pid,process_name,used_memory --format=csv,noheader,nounits. - gpu_
count - 2026-09-26: The device count from
nvidia-smi -L, one line per visible device. - gpu_
query - meminfo
- milli_
celsius - 2026-09-26: A
/sys/class/thermal/thermal_zone*/tempfile, milli-degrees Celsius, as °C;Nonewhen it is not a finite number. - performance
- 2026-09-26: The counters and the asserted reasons from
nvidia-smi -q -d PERFORMANCE. - thermal_
zone - 2026-09-26: Assemble one zone from its
typeandtempfile contents.