Count completed frames correctly in fault-book reports #597
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/597"
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?
Imported from readmet3xt-lab/foxhound. Originally posted by shiaho777 on 2026-12-04T13:06:45Z.
The recorder enables capture just after a frame boundary, then writes one end marker for each frame it captures. A five-marker book therefore covers five frames of faults, although there are only four measurable intervals between the markers. The report used four for both calculations.
Use the marker count for event rates and the interval count for elapsed time. Exclude events following the final marker from per-frame totals, and compare the hot-block fraction against 75% without rounding down. The regression book has blocks that fault in three and four of five frames. Only the second qualifies.
Verified with
python3 -m unittest discover -s scripts -p test_faultbook.pyandcargo xtask policy. The fixture generates the records in a temporary directory.Imported from readmet3xt-lab/foxhound. Originally posted by fromthemoonx on 2026-12-04T16:18:29Z.
The new counting matches what the recorder writes, checked on a book made by the real recorder.
A recorder-made book. With a temporary test (not committed) in a
diagnosticsbuild, I ranfaultbook::frameandnotethrough one full 40-frame capture. The faults were made up: block 7 in 29 of the frames, block 8 in 30, block 9 in all 40. The file holds 40 end markers, as you describe.mainTested at
353e654b, directly on currentmain(5e44415b). Windows 11 Pro, Python 3.12.10.python -m unittest discover -s scripts -p test_faultbook.py: 2 passed, three runs.cargo xtask policy: clean.main's script, and with each of these undone alone: dividing by the marker count, dividing the time by the intervals, dropping events after the last marker, the unrounded 75%.Not tested: a book from a running title. I did not run the Rust suite for this one, as only the two Python files change.
AI use: Claude Code (Claude Opus 5.5) ran the tests, read the diff and the recorder, and wrote this report.
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.