Skip to content

Feat/csv cpu gpu pct headers - #23

Merged
mledour merged 3 commits into
mainfrom
feat/csv-cpu-gpu-pct-headers
Jun 10, 2026
Merged

mledour merged 3 commits into
mainfrom
feat/csv-cpu-gpu-pct-headers

Conversation

@mledour

@mledour mledour commented Jun 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

mledour and others added 3 commits June 9, 2026 16:44
The merged CSV mixed unqualified CPU names (target_ms_*, target_pct_*) with explicit GPU names (target_gpu_ms_*), and had no GPU equivalent of the CPU '% of frame' figure. Make it symmetric: rename target_ms_*->target_cpu_ms_*, target_pct_*->target_cpu_pct_*, the per-row target_pct_of_frame->target_cpu_pct_of_frame; and add target_gpu_pct_{mean,min,max} stat lines + a per-row target_gpu_pct_of_frame column (target_gpu_us / frame_interval_us * 100, blank when the GPU sample or the interval is missing).

Applied to both producers (merge.cpp + analyze.py) so the byte-equivalence contract holds, plus the test_merge.cpp golden tests, the test_analyze.py assertions, and the README format docs. analyze.py validated end-to-end (19/19 pytest) on a fixture: GPU pct computes and blanks on the last frame per thread.

BREAKING: merged-CSV column/stat names changed; update any external spreadsheet/script keyed on target_ms_*, target_pct_*, or the target_pct_of_frame column.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e_count

A frame count is a cardinality, not a target cost, so the target_ prefix (reserved for target_gpu_ms_* / target_gpu_pct_*) does not belong on it. This also aligns the CSV header with the internal MergeStats field, already named gpu_frame_count. frame_count (the overall matched count) stays bare for the same reason -- header counts are now frame_count + gpu_frame_count. Updated both producers, the golden tests, and the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…change

The CPU-rename + GPU-pct + gpu_frame_count commits widened the merged CSV to fourteen # lines (7 CPU + 7 GPU) and nine columns ending in target_gpu_pct_of_frame, but several contracts/comments/examples still said eleven lines / eight (or seven) columns / target_gpu_us-trailing / '4 GPU lines', and the README GPU-pct example count ignored the last-frame-per-thread exclusion it documents. Self-review fixes:

- merge.h: WriteMergedCsv contract (fourteen lines, trailing target_gpu_pct_of_frame) + kExpectedColumnHeader '9-column' note. - README: schema prose (fourteen / seven+seven) + GPU-pct example count 1839->1838. - analyze.py / test_analyze.py / test_merge.cpp: 'nine columns' / '7 GPU lines'.

Comment/doc only; no behavior change (19/19 pytest green).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mledour
mledour merged commit ce9599d into main Jun 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant