Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add information about the action cache statistics in the Build Event Protocol #17315

Open
crydell-ericsson opened this issue Jan 25, 2023 · 2 comments
Labels
category: BEP P3 We're not considering working on this, but happy to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: feature request

Comments

@crydell-ericsson
Copy link
Contributor

Description of the feature request:

We think it would be good to include information about the action cache statistics somewhere in the Build Event Protocol. We are mainly interested in seeing information about the cache hits, similar to how information about runner counts is currently included, but the action cache statistics also contain other data that might be interesting to transfer over the BEP.

The simplest approach that would satisfy our use case could be to add a new entry to the RunnerCounts message that tracks the number of action cache hits, though this may be pragmatically dubious since the runners are functionally distinct from the action cache.

What underlying problem are you trying to solve with this feature?

Actions that are resolved via the action cache are not counted among the runners listed in the RunnerCounts message of the BEP, and there currently does not seem to be any other way of explicitly getting information about the action cache statistics. Including this information in the BEP would provide information that could be useful in improving the structure of builds.

Which operating system are you running Bazel on?

Red Hat Enterprise Linux 7.9

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@sgowroji sgowroji added type: feature request untriaged team-Core Skyframe, bazel query, BEP, options parsing, bazelrc category: BEP labels Jan 25, 2023
@haxorz haxorz added P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) labels Mar 9, 2023
copybara-service bot pushed a commit that referenced this issue Jul 11, 2023
Solves #17315 .

The field action_cache_statistics has been added to the ActionSummary message of the BuildMetrics message in the build event protocol. This field is defined with the already-existing ActionCacheStatistics message and is set in the MetricsCollector when the action cache is saved.

Closes #17615.

PiperOrigin-RevId: 547254460
Change-Id: I3ffe57a7a3e665ba0d44ec750411f773ec985f45
@tbaing
Copy link
Contributor

tbaing commented Sep 8, 2023

We're interested in this as well. We'd be interested in knowing not only how many cache hits eliminated the need for an action, but specifically which ones they were so we can aggregate statistics about per-action cache hit rates over many builds.

Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: BEP P3 We're not considering working on this, but happy to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-Core Skyframe, bazel query, BEP, options parsing, bazelrc type: feature request
Projects
None yet
Development

No branches or pull requests

4 participants