Add basic performance check#151
Open
Klaus Aehlig (aehlig) wants to merge 4 commits into
Open
Conversation
Klaus Aehlig (aehlig)
force-pushed
the
performance-metrics
branch
from
July 17, 2026 10:34
a6e16ce to
faccc68
Compare
Klaus Aehlig (aehlig)
marked this pull request as ready for review
July 17, 2026 10:49
Member
Author
Klaus Aehlig (aehlig)
force-pushed
the
performance-metrics
branch
from
July 21, 2026 10:30
faccc68 to
cd15d7e
Compare
This property of a test is very stable, however only a very rough estimate of the resource needs. The limits in the tests are chosen in such a way that moderate growth still won't make tests fail. Still having a warning on substantial changes might prevent some mistakes, and making the metrics that bazel collects anyway available to tests is cheap.
These metrics are less stable, especially when using persistent workers to build the test fixtures; nevertheless, they are closer to the actual build evaluation. Due to their unstable nature, limits are chosen generously, just making sure huge performance changes are detected.
After a build run bazel info used-heap-size-after-gc to ask bazel of the heap size still in use after the build. This is a good proxy for the memory of the final dependency graph. This metrics should be valid even though we use bazel persistent workers, as a change of sample project completely invalidates the project-specific parts of the old project and only valid graph parts are kept between builds.
Klaus Aehlig (aehlig)
force-pushed
the
performance-metrics
branch
from
July 21, 2026 12:32
cd15d7e to
b3198e6
Compare
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.
As we frequently extend our aspect to obtain more information, we should have same basic sanity-checks warning us if we accidentally increase the build size too much. To do so, we use metrics that bazel collects anyway and focus on stable ones.