summaryrefslogtreecommitdiff
path: root/tools/metrics.py
AgeCommit message (Collapse)Author
2025-10-23tools/metrics.py: Tersely show the commits in the size report.Jeff Epler
This will show a line for both the reference and comparison, e.g., Reference: zephyr/boards: Add PocketBeagle 2 rev A1… [00a926e99e] Comparison: metrics: Tersely show the commi… [merge of c7ac411e22] When the comparison is a merge commit (as it is during CI) the second parent of that commit is shown instead. This will be helpful when checking which revision of the code size report comment on a PR corresponds to which revision of the code. Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2025-10-08tools/metrics.py: Allow pre_cmd to set up environment.Jeff Epler
This is a necessary step to allow cleanly building the xtensa port during CI, as it's undesirable to apply the esp-idf environment settings while building other ports. PRE_CMD_<letter> can be used to override the command, or add a command if not otherwise specified. Note that <letter> is case sensitive. Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2025-10-08tools/metrics.py: When cleaning also clean mpy-cross.Jeff Epler
Changes of interest could be in emitted mpy frozen files. Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2025-10-08tools/metrics.py: Use all CPUs during comparison builds.Jeff Epler
Don't simply hard-code a parallelism of 3 for the build. Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2025-09-24tools/metrics.py: Compute mpy-cross size as part of size metrics.Damien George
Add support to `tools/metrics.py` to compute the size delta of mpy-cross, alongside the sizes of port firmware. This is an easy and cheap addition because mpy-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 changes affect code size, and helps to eliminate any unwanted increases in mpy-cross. Signed-off-by: Damien George <damien@micropython.org>
2024-09-23tools/metrics.py: Add VIRT_RV32 to the code size metrics.Alessandro Gatti
This commit adds the Qemu-based RISC-V 32 bits `VIRT_RV32` board to the list of ports/boards to be built for measuring code size changes. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2024-06-04tools/metrics.py: Change rp2 board selection to RPI_PICO_W.Damien George
This tool is used to compute size differences in the firmware (eg as part of CI), but it doesn't currently check any firmware that has bare-metal lwIP/networking, making it hard to see how firmware size changes when networking related changes are made. So, change the board selection for the rp2 port to RPI_PICO_W. Changes in size to standard RPI_PICO firmware will be very similar to other bare-metal boards like PYBV10. Signed-off-by: Damien George <damien@micropython.org>
2023-10-04tools/metrics.py: Fix esp32 and esp8266 board names after renaming.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-09-02tools/metrics.py: Fix nrf and rp2 board names after renaming.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2023-04-27renesas-ra: Change MICROPY_HW_BOARD_NAME definition to product name.Takeo Takahashi
Changes in this commit: - Change MICROPY_HW_BOARD_NAME definition to match the product name. - Rename board folder's name to match the product name style. - Change related files like Makefile, document descriptions, test cases, CI and tools. Signed-off-by: Takeo Takahashi <takeo.takahashi.xv@renesas.com>
2022-08-11unix/variants: Remove variant suffix from executable filename.Damien George
The executable now lives in the build directory, and since the build directory already contains the variant name there is no need to also add it to the executable. Signed-off-by: Damien George <damien@micropython.org>
2022-06-17tools/metrics.py: Add mimxrt and renesas-ra to list of available ports.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-04-20tools/metrics.py: Add rp2 port to table of ports that can be built.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-04-06tools/metrics.py: Fix esp32 output filename due to move to CMake.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2020-04-22tools/metrics.py: Use OrderedDict when reading build log.Damien George
So that the output (eg of the diff command) always has the lines in the same order.
2020-04-22tools/metrics.py: Don't build mpy-cross if not needed by any ports.Damien George
To save build time.
2020-04-22tools/metrics.py: Add option to diff to error if delta above threshold.Damien George
Useful for things like CI where the size check is automated.
2020-03-11tools/metrics.py: Use check_call instead of run to error out on error.Damien George
2020-02-28all: Reformat C and Python source code with tools/codeformat.py.Damien George
This is run with uncrustify 0.70.1, and black 19.10b0.
2020-01-23tools: Add metrics.py script to build and compute port sizes/metrics.Damien George