[pr-diagnostics][performance] Check the common coverage of two frame CSVs #230
Loading…
Reference in a new issue
No description provided.
Delete branch "superhero-520/Darner:bench-frame-csv-coverage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Contributor role (optional)
Role already held.
What it changes
A missing interior CSV row can leave a benchmark report looking usable even when the writer reports zero losses. A recording can also end before the requested comparison window. This adds an offline checker for the A/B procedure discussed in #152.
Give the checker the CSV from each run, the timestamp of the same event in each, and one duration. It reports the common time range, complete frame intervals, host-row gaps and writer loss for each run. Missing counters are reported as unknown. A sample command for a 10-second comparison is:
python scripts/check-frame-csv-coverage.py A.csv B.csv --start-a-ms 60000 --start-b-ms 60000 --duration-ms 10000How it was tested
6d9e99d2d9487340f1174a9d295e276190351cc5: all 9 Python tests passed, and the asset-policy check passed for 555 files. A zero-duration row tied at the end of the window now reports one missing host row and one writer loss (exit 1). Moving that row past the endpoint keeps the control clear (exit 0). The 60–70 s bench-kit replay gave 102/102 complete intervals for the intact pair and 102/101 after removing host row 15112. The Rust gate results below were measured on the preceding revision.3a89c9b5e4000352eb9974d6453ea7473a0b00f0, based onf3840d73d3504c30218debfbc8795b9225447317. All 8 Python tests passed withpython -B -m unittest discover -s tests -v.cargo xtask policypassed.cargo test --workspace --lockedstopped indarner-gpuwith 1,772 passed and one failure inwatch::tests::ask_once_by_res_splits_reservations_without_refusals. The same assertion atwatch.rs:8614also failed on clean main. Open PR #150 changes the assertion that failed here. The same #230 test binary passed that test in isolation.Checklist
main.docs/asset-policy.md.Checked for overlap
I ran
3a89c9b5against the four full gameplay CSVs used in #209. Each 45-second window starts 55 seconds after the first world frame. I mapped that event into each file’s elapsed clock using the nearest timestamped row.All four counts match the independently exported rows exactly (6,194 total). All four showed zero missing host rows, writer losses and timing breaks.
For a negative control I removed one interior row in a copy of A2 and set
rows_lost=1on its successor. The same 45-second request returned 1, with 1,400 A frames, one missing host row and one writer loss. A one-second window starting at the surviving row’s end returned 0. Asking for two seconds with only one second left in A returned 1 and reported the one-second overlap. These checks cover recording continuity. The draw-count difference between A3 and B3 still matters for any speed comparison.Tested with Codex assistance.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.