parse_line

Function parse_line 

Source
pub fn parse_line(line: &str, at: Instant) -> Option<PowerSample>
Expand description

2026-09-26: Parse one CSV row of --query-gpu=power.draw.average,clocks_event_reasons.sw_power_cap,clocks_event_reasons.hw_power_brake_slowdown with --format=csv,noheader,nounits, e.g. 4.76, Not Active, Active.

None when the watt cell is not a finite, non-negative number, so a [N/A] rail never integrates as zero watts. A missing or unrecognised flag cell leaves that flag None rather than “not active”.