Skip to content

x/benchmarks: add a benchmark for distribution size #68706

Closed

Description

@matloob

Update (2026-03-19): this issue has been repurposed to add a benchmark to the x/benchmarks repo that can run on the performance dashboard.

This might belong in cmd/dist instead.

We should add a test that checks that the distribution size in not above a certain threshold so that we can catch cases where the distribution size is increased accidentally.

Activity

  1. self-assigned this
    on Aug 1, 2024
  2. added this to the Go1.24 milestone on Aug 1, 2024
  3. modified the milestones: Go1.24, Go1.25 on Feb 11, 2025
  4. modified the milestones: Go1.25, Go1.26 on Aug 12, 2025
  5. modified the milestones: Go1.26, Go1.27 on Feb 10, 2026
  6. gopherbot commented on Mar 12, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/754921 mentions this issue: cmd/distpack: add a test on distribution size

  7. dmitshur commented on Mar 13, 2026

    @dmitshur
    Member

    @cherrymui, @prattmic Do you recall if there were plans (or maybe existing work) to incorporate binary size tracking into the performance dashboard or so? Adding a test in the main tree (as done in CL 754921) lets it detect a significant increase beyond a constant threshold, whereas if we had that number in the performance dashboard, it would make it easier to catch unexpected smaller deviations and bisect to where they happen.

    I wanted to ask in case it's not going to take much work to adjust the test being added and get continuous tracking for it. It sounds like this issue is about checking for a specific threshold, so this can certainly be a follow up issue (or maybe such an issue already exists).

  8. prattmic commented on Mar 13, 2026

    @prattmic
    Member

    The performance dashboard has tracking of a few Go binaries, but those are test binaries from third party packages (i.e., go test -c pkg).

    I have a vague feeling that we've discussed adding the full Go distribution size, but I don't think there are any concrete plans.

    The perf builders run https://cs.opensource.google/go/x/benchmarks/+/master:cmd/bench/ (which itself mostly just runs the bent and sweet tools). I don't think it would be hard to add a one-off benchmark to that tool that uses distpack to build the distribution and then emits a benchmark result with the size. The result should look something like:

    Unit total-bytes assume=exact
    BenchmarkGoDistribution 1 12345678 total-bytes
    

    (Inspired by benchsize, which handles the go test -c cases)

  9. matloob commented on Mar 13, 2026

    @matloob
    ContributorAuthor

    Yeah adding it to the dashboard would be great... the test can only do so much.

  10. changed the title [-]cmd/go: add a test for distribution size[/-] [+]x/bench: add a benchmark for distribution size[/+] on Mar 19, 2026
  11. matloob commented on Mar 19, 2026

    @matloob
    ContributorAuthor

    I'll drop the test in favor of a benchmark in x/benchmarks.

  12. changed the title [-]x/bench: add a benchmark for distribution size[/-] [+]x/benchmarks: add a benchmark for distribution size[/+] on Mar 19, 2026
  13. removed
    compiler/runtimeIssues related to the Go compiler and/or runtime.
    on Mar 19, 2026
  14. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Mar 19, 2026
  15. gopherbot commented on Mar 20, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/757460 mentions this issue: x/benchmarks: add a sweet benchmark for distribution size

  16. gopherbot commented on Mar 23, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/758120 mentions this issue: cmd/bench: compute distribution size

  17. added a commit that references this issue on Mar 23, 2026
    7d793f0
  18. khalidsaidi commented on Mar 25, 2026

    @khalidsaidi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GoCommandcmd/goNeedsFixThe path to resolution is known, but the work has not been done.

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions