-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
First check-in of configuration overhead measurement tool #11511
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
i.e. first check-in of [Measuring Configuration Overhead](https://docs.google.com/document/d/10ZxO2wZdKJATnYBqAm22xT1k5r4Vp6QX96TkqSUIhs0/edit). This just establishes supporting structure. The tool is not yet functional. Specifically: - `types.py`: defines data structures for "configuration" and "configured target" - `bazel_api.py`: API to translate `bazel cquery` and `bazel config` calls into the above data structures - `bazel_api_test.py`: tests - `ctexplain.py`: stump of an entry point The tests utilize an existing Python test framework for invoking Bazel (`//src/test/py/bazel:test_base`). Work towards bazelbuild#10613 Closes bazelbuild#11511. PiperOrigin-RevId: 315479921 Change-Id: I00898a4579e20483c8c4c3f5250afc22ee1e1695
PiperOrigin-RevId: 315479921 Change-Id: I00898a4579e20483c8c4c3f5250afc22ee1e1695
#11511 set up basic project structure. This PR adds minimum working functionality. Specifically, you can run it with a build command and it reports basic stats on the build's graph. Example: ``` $ bazel-bin/tools/ctexplain/ctexplain -b "//testapp:foo" Collecting configured targets for //testapp:foo... done in 0.62 s. Configurations: 3 Targets: 79 Configured targets: 92 (+16.5% vs. targets) Targets with multiple configs: 13 ``` Notes: * Changed import structure to prefer module imports over function, class imports (style guide recommendation) * Set up structure for injecting arbitrary analyses. Each analysis consumes the build's set of configured targets and can output whatever it wants. * Implemented one basic analysis * Structured code to make it easy to fork output formatters (e.g. for machine-readable output). But tried not to add speculative inheritance / boilerplate too soon Context: [Measuring Configuration Overhead](https://docs.google.com/document/d/10ZxO2wZdKJATnYBqAm22xT1k5r4Vp6QX96TkqSUIhs0/edit). Work towards #10613 Closes #11829. PiperOrigin-RevId: 328325094
i.e. first check-in of Measuring Configuration Overhead.
This just establishes supporting structure. The tool is not yet functional.
Specifically:
types.py
: defines data structures for "configuration" and "configured target"bazel_api.py
: API to translatebazel cquery
andbazel config
calls into the above data structuresbazel_api_test.py
: testsctexplain.py
: stump of an entry pointThe tests utilize an existing Python test framework for invoking Bazel (
//src/test/py/bazel:test_base
).Work towards #10613