Skip to content

Commit c04cb88

Browse files
committed
TEST: add ExecuTorch source-breakdown table to step summary
Adds a small head-only table after the headline showing per-bucket sizes for runtime/extension/backends/kernels/tokenizers/flatbuffer. No deltas — just "how big is each source area in the new binary". Excludes libc/stdlib/metadata/other so the table stays tight.
1 parent 504c7b0 commit c04cb88

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/scripts/bloaty_diff.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@
4545
# Sticky-comment lookup trusts comments whose author login is in this set.
4646
# Prevents marker collision if a user quotes COMMENT_MARKER in their own comment.
4747
BOT_LOGINS = {"github-actions[bot]", "pytorch-bot[bot]", "facebook-github-bot"}
48+
# Buckets (from test/bloaty/executorch.bloaty) considered "ExecuTorch source".
49+
EXECUTORCH_SOURCE_BUCKETS = [
50+
"runtime",
51+
"extension",
52+
"backends",
53+
"kernels",
54+
"tokenizers",
55+
"flatbuffer",
56+
]
4857

4958

5059
def run_bloaty(elf: Path, data_sources: str) -> List[Dict[str, int]]:
@@ -352,6 +361,14 @@ def cmd_measure(args: argparse.Namespace) -> int:
352361
summary_path = os.environ.get("GITHUB_STEP_SUMMARY")
353362
if summary_path:
354363
body = render_comment([report], run_url=None)
364+
# Per-bucket totals for ExecuTorch source code (no diff, head only).
365+
groups_by_name = {r["executorch"]: r["filesize"] for r in report.groups_head}
366+
src_rows = [
367+
[b, str(groups_by_name[b])]
368+
for b in EXECUTORCH_SOURCE_BUCKETS
369+
if b in groups_by_name
370+
]
371+
src_table = render_table(["bucket", "size"], src_rows) if src_rows else ""
355372
with open(summary_path, "a") as f:
356373
f.write(
357374
body
@@ -360,6 +377,8 @@ def cmd_measure(args: argparse.Namespace) -> int:
360377
f"Δ within ±{DELTA_NOISE_BYTES} bytes; nothing to report.\n"
361378
)
362379
f.write("\n")
380+
if src_table:
381+
f.write(f"\nExecuTorch source breakdown:\n{src_table}\n\n")
363382
if base is not None:
364383
f.write(
365384
f"<details><summary>Full per-symbol diff ({report.job})</summary>\n\n"

0 commit comments

Comments
 (0)