diff options
| author | Ha Thach <[email protected]> | 2025-12-05 20:12:45 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-05 20:12:45 +0700 |
| commit | e73dfde96dcf59e6357d833adbe49c1cf716a1b3 (patch) | |
| tree | 681f037cf5b1f410b248582868638301da692ec0 /tools | |
| parent | 93b53158f02bce9497419298ac27150eebe567d3 (diff) | |
also render unchange table (#3390)
* also render unchange table
* run metrics with circleci (full all boards build)
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/metrics.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/metrics.py b/tools/metrics.py index bdc64fccc..2794c7a2a 100644 --- a/tools/metrics.py +++ b/tools/metrics.py @@ -275,11 +275,13 @@ def write_compare_markdown(comparison, path, sort_order='size'): significant = [] minor = [] + unchanged = [] for f in sorted_files: - # Skip files with no changes - if f["total"]["diff"] == 0 and all(f["sections"][s]["diff"] == 0 for s in sections): - continue - (significant if is_significant(f) else minor).append(f) + no_change = f["total"]["diff"] == 0 and all(f["sections"][s]["diff"] == 0 for s in sections) + if no_change: + unchanged.append(f) + else: + (significant if is_significant(f) else minor).append(f) def render_table(title, rows): md_lines.append(f"## {title}") @@ -323,6 +325,7 @@ def write_compare_markdown(comparison, path, sort_order='size'): render_table("Changes >1% in any section", significant) render_table("Changes <1% in all sections", minor) + render_table("No changes", unchanged) with open(path, "w", encoding="utf-8") as f: f.write("\n".join(md_lines)) |
