Skip to content

Add basic performance check - #151

Open
Klaus Aehlig (aehlig) wants to merge 4 commits into
JetBrains:mainfrom
aehlig:performance-metrics
Open

Add basic performance check#151
Klaus Aehlig (aehlig) wants to merge 4 commits into
JetBrains:mainfrom
aehlig:performance-metrics

Conversation

@aehlig

Copy link
Copy Markdown
Member

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.

@aehlig

Copy link
Copy Markdown
Member Author

cc eugenezh (@eugenezh)

@aehlig
Klaus Aehlig (aehlig) force-pushed the performance-metrics branch 2 times, most recently from cd15d7e to b3198e6 Compare July 21, 2026 12:32
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.
@aehlig
Klaus Aehlig (aehlig) force-pushed the performance-metrics branch 2 times, most recently from 9cb1bb1 to e6b3066 Compare August 13, 2026 10:09
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant