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)

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.
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