You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
x/benchmarks: add a benchmark for distribution size #68706
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.
Reacted by Daniel Martí, Than McIntosh and Dmitri Shuralyov
@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).
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)
Activity
gopherbot commentedon Mar 12, 2026
Change https://go.dev/cl/754921 mentions this issue:
cmd/distpack: add a test on distribution sizedmitshur commentedon Mar 13, 2026
@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).
prattmic commentedon Mar 13, 2026
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
bentandsweettools). 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:(Inspired by benchsize, which handles the go test -c cases)
matloob commentedon Mar 13, 2026
Yeah adding it to the dashboard would be great... the test can only do so much.
[-]cmd/go: add a test for distribution size[/-][+]x/bench: add a benchmark for distribution size[/+]matloob commentedon Mar 19, 2026
I'll drop the test in favor of a benchmark in x/benchmarks.
[-]x/bench: add a benchmark for distribution size[/-][+]x/benchmarks: add a benchmark for distribution size[/+]gopherbot commentedon Mar 20, 2026
Change https://go.dev/cl/757460 mentions this issue:
x/benchmarks: add a sweet benchmark for distribution sizegopherbot commentedon Mar 23, 2026
Change https://go.dev/cl/758120 mentions this issue:
cmd/bench: compute distribution sizecmd/bench: compute distribution size
khalidsaidi commentedon Mar 25, 2026