Looks like the hit rate is low, even on test changes such as https://github.com/bitcoin/bitcoin/actions/runs/21476546461/job/61867393974#step:10:3349
to make it easier to debug, unconditionally print the low hit rate notice
Looks like the hit rate is low, even on test changes such as https://github.com/bitcoin/bitcoin/actions/runs/21476546461/job/61867393974#step:10:3349
to make it easier to debug, unconditionally print the low hit rate notice
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
See the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.
Possible typos and grammar issues:
2026-01-29 20:37:38
147@@ -148,11 +148,9 @@ cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target $GOAL || (
148 )
149
150 bash -c "${PRINT_CCACHE_STATISTICS}"
151-if [ "$CI" = "true" ]; then
152- hit_rate=$(ccache -s | grep "Hits:" | head -1 | sed 's/.*(\(.*\)%).*/\1/')
153- if [ "${hit_rate%.*}" -lt 75 ]; then
154- echo "::notice title=low ccache hitrate::Ccache hit-rate in $CONTAINER_NAME was $hit_rate%"
155- fi
156+hit_rate=$(ccache --show-stats | grep "Hits:" | head -1 | sed 's/.*(\(.*\)%).*/\1/')
Note: -s is indeed equivalent to --show-stats:
-s, --show-stats show summary of configuration and statistics counters in human-readable format (use -v/--verbose once or twice for more details)
ACK fad2876ec330dbb833905d3b2ee5753abc3bc3af
The CI restricting condition was removed & added the long form of -s to document the code better