tools/metrics.py: Compute mpy-cross size as part of size metrics. #18006
+8
−0
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.
Summary
Add support to
tools/metrics.py
to compute the size delta ofmpy-cross
, alongside the sizes of port firmware. This is an easy and cheap addition becausempy-cross
is usually built before the ports are.Although the size of
mpy-cross
is not critical, it's still a nice indication of how the PR affects code size, and helps to eliminate any unwanted increases inmpy-cross
.Testing
Tested locally, eg the output looks like (for no change):
CI will also test this, it should include
mpy-cross
in the automatic report.Trade-offs and Alternatives
mpy-cross
is already built as part of the code-size CI workflow, so we may as well report its size difference, along with port firmware size difference. It doesn't increase the time for the CI.