kempnerpulse.present.csv_writer¶
CSV export — the column registry keyed to ComputedRecord/canonical.
The export schema (column names, units, precision, and ordering) is preserved
exactly from the single-file implementation so downstream tooling reads the same
files. The difference is the source: each column extracts from a
ComputedRecord and its CanonicalRecord (canonical fractions/SI)
and converts to the documented display unit at write time.
Audit of units/precision (unchanged from legacy):
*_pctcolumns:fraction × 100formatted.2f;pcie_*_bytes_s: raw bytes/second formatted.4f;nvlink_gbps:bytes/s ÷ 1e9formatted.4f(== legacyMB/s ÷ 1e3);power_w/*_temp_c/*_clock_mhz/mem_used_mib: raw value.4f;mem_total_mib:.1f;mem_used_pct:.2f;energy_j: cumulative joules.1f;pcie_replay_rate_s: differenced rate.2f;real_util_pct:.2f;status/health: strings from the record.
An unavailable reading (None) is emitted as an empty field, never 0.
Functions
|
The header row (column names) for a resolved column list. |
|
One CSV row for |
|
Resolve an export spec to an ordered list of |
Exceptions
One or more requested export columns are not in the registry. |
- exception kempnerpulse.present.csv_writer.UnknownExportColumns[source]¶
Bases:
ValueErrorOne or more requested export columns are not in the registry.
- kempnerpulse.present.csv_writer.resolve_columns(spec)[source]¶
Resolve an export spec to an ordered list of
(name, extractor).specis"default","all", or a comma-separated list of column names. Unknown names raiseUnknownExportColumns(the caller decides how to surface it — this layer does not exit the process).