CI: consolidate metrics scripts into one Python module#106
Merged
Conversation
typeless
force-pushed
the
ci/task-clock-units
branch
2 times, most recently
from
July 18, 2026 03:57
7482a8c to
073f518
Compare
PR metricsPerformance (gcc example, Linux)
Deterministic signals: page faults, peak RSS, and the cachegrind D1/LL miss rates (simulated cache, exact across runs). CPU time is user+sys from time(1); instructions read n/a on GitHub-hosted runners (virtualized, no PMU). Test coverage (lines)
95 files · 13780/16220 lines covered Deltas vs main@b49caca44. Updated for a9f80af |
bench_metrics.sh, coverage_stats.py, and compose_metrics.py shared a TSV schema defined twice and parsed perf/valgrind output in embedded awk fragments that failed twice on unseen input shapes (<not supported> counters, task-clock in ns instead of msec). One .github/scripts/metrics command with bench, coverage, and render subcommands keeps the schema in one place, makes the parsers plain testable functions, and normalizes task-clock via its unit token. Shebang-invoked; the implementation language is not part of the interface. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5KUoGDhJEZYoiK9CkeXtz
typeless
force-pushed
the
ci/task-clock-units
branch
from
July 18, 2026 04:11
073f518 to
a9f80af
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The three metrics scripts (
bench_metrics.sh,coverage_stats.py,compose_metrics.py) become one shebang-invoked.github/scripts/metricscommand withbench/coverage/rendersubcommands, folding in the task-clock unit fix.Why: the TSV schema was defined twice (a shell
printfand Python dict keys), and every defect so far — counters rendering as 0 instead of n/a, CPU time as 228882 s — lived in embedded awk fragments that can't be tested. The parsers are now plain functions verified against captured output, including the exact ns-format task-clock line from the failing CI run (228,882,540 ns → 0.23 s, matching that run's 0.232 s wall). task-clock is normalized via its unit token (msec/usec/ns).Verified locally:
benchreproduces the shell version's TSV byte-for-byte on the same tree;coverage+renderwith and without a fabricated baseline produce the same tables and deltas as before; exec bit is 100755 in the index; workflow YAML validated.🤖 Generated with Claude Code
https://claude.ai/code/session_01U5KUoGDhJEZYoiK9CkeXtz