proposal: track binary size per commit with MemBrowse

Đang mở
#6,326 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
12/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, go
Lĩnh vực
ci-cd

Hướng nghiên cứu

This is a proposal to add an external service (MemBrowse) for tracking binary size per commit, not a code change with a named file. It refers to the size-test discussion in #6268 and the existing sizediff PR comment workflow. Deciding whether to adopt it is a maintainer decision, and done would mean an agreed approach, such as the workflow_run setup and the MEMBROWSE_API_KEY secret, not a patch.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Background

In #6268 there is support for making the size tests non blocking, and @dgryski suggested building something like arewefastyet that tracks binary sizes over time in a format more useful for humans.

I work on MemBrowse, a service that tracks flash and RAM usage per commit from ELF files and linker scripts. The docs have a short video that explains how it works. I set it up on a fork of TinyGo to see if it fits this need.

Demo: https://membrowse.com/public/michael-membrowse/tinygo

What it provides

  • Flash and RAM per target for every commit on dev, with a history chart.
  • Breakdown by memory region, section, symbol and source file, read from the ELF and DWARF info. You can see which symbols grew in a given commit.
  • A PR comment with the size change per target. It is posted from a separate workflow_run workflow, so it also works for PRs from forks. The current sizediff comment is skipped for those.
  • No need to build twice for a PR. The base commit's report is already stored on the platform, so CI only builds the PR head.
  • You can set up memory budgets that alert when a target goes over a limit.

Setup

  • Create an account on MemBrowse.
  • Create a project for tinygo-org/tinygo.
  • Set the project's API key as the MEMBROWSE_API_KEY GitHub repository secret.

If this is of interest I can open a PR with the workflows.

Ngôn ngữ chính
Go
Star
17.8k
Fork
1.1k
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
380

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tinygo-org/tinygo

Tất cả issue của tinygo-org/tinygo

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.