-
Notifications
You must be signed in to change notification settings - Fork 2.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
Small artifacts for bloat reports #9331
Conversation
e16da0a
to
0a266db
Compare
379650a
to
a569bdd
Compare
Note: the bloat check workflow is expected to run this with something like :
(in this example highlighting size increases over 1%) |
Do you have an example of the reports will look like? |
A small fake-data example is below. For actual runs, the table would contain all the available builds. I'll try to add a fuller example later. PR #1234: Size comparison from d571fb9 to e1ea910 Increases above 1.0% from d571fb9 to e1ea910:
1 build
|
Nice.. I've really missed the baseline in the current reports. |
Here's an example of what a full report would look like, given the workflows in this PR. (This is a comparison of two handy builds on my fork, and doesn't match an actual commit or PR.) Size comparison from a184f57 to df7771f Increases above 1.0% from a184f57 to df7771f:
40 builds
|
#### Problem The current bloat report requires preserving large binaries, and has trouble matching tree parents for comparison. #### Change overview This change makes example builds generate small artifacts containing json file(s) containing build item identification and section sizes. Artifacts names have the form “Size,PR,WORKFLOW,CURRENT_SHA,PARENT_SHA”; these contain one or more json files, each containing a report on one build target. The reporting scripts then examines the list of available artifacts to list of artifacts to identify pairs with the same $WORKFLOW where one's $CURRENT_SHA is the other's $PARENT_SHA, and only then downloads and processes those artifacts to generate comparisons for matching builds. - Changes to `examples-…` workflows: - Adds some `GH_EVENT_…` variables to workflow `env`, to identify the current run. - Uses the `gh_sizes.py` script to generate size report json files. - Uploads size report artifacts. - Changes to `scripts/tools/memory`: - Adds minimal platform config files for recently-added platforms. - Adds markdown output options (required for github comments) along with some associated cleanup. - Adds a script `scripts/tools/memory/gh_sizes.py` for use by workflows; this is similar to `report_summary.py` with a suitable consistent set of arguments. - Adds a script `scripts/tools/memory/gh_report.py` to analyze size report artifacts. - Modifies `bloat_check.py` to ignore the size report artifacts. The github comments produced by `gh_report.py` are slightly different fromt the existing reports. Since this change enables reports for many more builds, a full report will be over a hundred lines, and is placed inside a details tag. Only size changes above a configurable threshold are called out ‘above the fold’. Note that this PR does _not_ include a change to actually send size report comments on github; this is left to a followup after that code has been verified on real-world size artifacts. #### Testing Fork-CI runs and offline verification on resulting artifacts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not carefully review and understand all the scripts/tools/memory/memdf
changes....
I also did not verify the various section names under scripts/tools/memory/platform/
- restore original scripts/examples/esp_example.sh and scripts/examples/gn_efr32_example.sh - avoid a problem using pyelftools `describe_p_type`
Size increase report for "esp32-example-build" from 2addf00
Full report output
|
#### Problem The current bloat report requires preserving large binaries, and has trouble matching tree parents for comparison. In a24a6c3 (PR project-chip#9331), many workflows started uploading small json artifacts contains size information for their builds, but these have not yet been used to generate reports. #### Change overview This change adds a run of `scripts/tools/memory/gh_report.py` to the periodic bloat check workflow, with tight rate limiting in case there are unexpected problems. #### Testing Manually run offline with various data sets, and minimally on the live repository.
#### Problem The current bloat report requires preserving large binaries, and has trouble matching tree parents for comparison. In a24a6c3 (PR #9331), many workflows started uploading small json artifacts contains size information for their builds, but these have not yet been used to generate reports. #### Change overview This change adds a run of `scripts/tools/memory/gh_report.py` to the periodic bloat check workflow, with tight rate limiting in case there are unexpected problems. #### Testing Manually run offline with various data sets, and minimally on the live repository.
Small-artifact bloat reports
Problem
The current bloat report requires preserving large binaries, and has
trouble matching tree parents for comparison.
Change overview
This change makes example builds generate small artifacts containing
json file(s) containing build item identification and section sizes.
Artifacts names have the form “Size,PR,WORKFLOW,CURRENT_SHA,PARENT_SHA”;
these contain one or more json files, each containing a report on one
build target.
The reporting scripts then examines the list of available artifacts to
list of artifacts to identify pairs with the same $WORKFLOW where one's
CURRENT_SHA is the other's PARENT_SHA, and only then downloads and
processes those artifacts to generate comparisons for matching builds.
Changes to
examples-…
workflows:GH_EVENT_…
variables to workflowenv
, to identifythe current run.
gh_sizes.py
script to generate size report json files.Changes to
scripts/tools/memory
:with some associated cleanup.
scripts/tools/memory/gh_sizes.py
for use by workflows;this is similar to
report_summary.py
with a suitable consistent setof arguments.
scripts/tools/memory/gh_report.py
to analyze sizereport artifacts.
Modifies
bloat_check.py
to ignore the size report artifacts.The github comments produced by
gh_report.py
are slightly differentfromt the existing reports. Since this change enables reports for many
more builds, a full report will be over a hundred lines, and is placed
inside a details tag. Only size changes above a configurable threshold
are called out ‘above the fold’.
Note that this PR does not include a change to actually send size
report comments on github; this is left to a followup after that code
has been verified on real-world size artifacts.
Testing
Fork-CI runs and offline verification on resulting artifacts.