Repository navigation
CIMetrics: report ccache hit rates with --ccache - #48
Open
willson556 wants to merge 3 commits into
Open
willson556 wants to merge 3 commits into
willson556 wants to merge 3 commits into
Conversation
The shared ccache store rollout gates on per-job hit rates and on how many jobs start with an empty cache. The Sep 17-23 baseline for those came from a one-off log scrape; this puts it in CIMetrics so every gate uses the same script. --ccache downloads the log of each completed job with a ccache step, parses the last `ccache -s` (ccache 4.5 and 4.12 layouts, plus remote storage errors and timeouts), and adds a ccache section per repo: by job, and by PR state and base (main/dev or stacked). jobs.tsv gains ccache_hits and ccache_cacheable columns. Only parsed stats are cached. Also fixes the PR cache, which was keyed by repo only, so a second date range reused the first range's PR list. It is now keyed by range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
willson556
marked this pull request as ready for review
October 9, 2026 17:45
staflsystemsci
Bot
requested review from
a team,
fcheein,
gretl-silva-stafl,
mament0,
mns4595,
mzhu48,
nehalkpatel and
thebhef
and removed request for
a team
October 9, 2026 17:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review SLA Nobody owes a review on this PR right now. Due times are in business hours, 10:00 to 17:00 Pacific: 4 h for a PR under 250 added lines, 7 h otherwise, and 4 h for a re-review. Mid-stack, an assignee owes a response on the lowest PR they haven't approved. Dashboard |
nehalkpatel
approved these changes
Oct 9, 2026
mament0
approved these changes
Oct 12, 2026
fcheein
approved these changes
Oct 12, 2026
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 shared ccache store rollout (CI RFC Proposal 2) gates each step on ccache hit rates and on how many jobs start with an empty cache. The Sep 17–23 baseline for those came from a one-off log scrape (
ccache_stafllib.md). This adds them to CIMetrics so every gate uses the same script.--ccache:ccache -sin it.Summary:) and the IAR-capable fork, 4.12 (Cacheable calls:). It reads the first Hits line, which counts each cacheable call once, not the per-storage lookup counts below it.<out>/<repo>/ccache/. Logs that can't be fetched are retried on the next run.Report: a ccache section per repo, with jobs measured, jobs with no hits, share with no hits, and hit rate (hits over cacheable calls, summed):
build-embedded (arm-cm7-iar-Debug)). GitHub cuts job names at 100 characters, so the label doesn't depend on the closing parenthesis.jobs.tsvgainsjob_id,base,ccache_hitsandccache_cacheablecolumns.Fix along the way: the PR cache was
<out>/<repo>/prs.jsonregardless of date range, so a second range reused the first range's PR list. It's nowprs_<since>_<until>.json.Testing:
uv run --with pytest pytest CIMetrics: 9 cases. They cover both stats layouts (copied from real Sep 18 logs), the remote-storage block, ANSI codes, a log with no stats, job labels including a cut-off name, and the row math. A newci-metrics-tests.ymlworkflow runs them.--ccacheon Sep 23 for StaflLib and coit-tower. All 361 logs were fetched and parsed, and none failed.host-Debug446 / 909, every embedded build 0 hits).Follow-up: once
SetupCcacheexists, it could print its stats as a::notice::. CIMetrics could then read them from the check-run annotations instead of downloading roughly 1,800 logs a week.🤖 Generated with Claude Code