Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: -benchtime flag should be cacheable #44555

Closed
bcmills opened this issue Feb 23, 2021 · 1 comment
Closed

cmd/go: -benchtime flag should be cacheable #44555

bcmills opened this issue Feb 23, 2021 · 1 comment
Labels
FrozenDueToAge GoCommand cmd/go help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Feb 23, 2021

Currently, cmd/go has a fixed list of flags for which test results may be cached:

case "-test.cpu",
"-test.list",
"-test.parallel",
"-test.run",
"-test.short",
"-test.timeout",
"-test.v":

Test flags outside of that list cause the test result not to be cached.

The -benchtime flag should be in the cacheable set, but today it is treated as non-cacheable.

If the -benchtime flag is set without -bench, then no benchmarks will be run and no benchmark results need to be re-run. If the -benchtime flag is set with -bench, then -bench suffices to invalidate the cache, and there is no need for -benchtime to do so as well.

(This issue is an offshoot of #44499.)

@bcmills bcmills added help wanted NeedsFix The path to resolution is known, but the work has not been done. GoCommand cmd/go labels Feb 23, 2021
@bcmills bcmills added this to the Backlog milestone Feb 23, 2021
@bcmills bcmills changed the title cmd/go: -benchtime should be cacheable if -bench is not set cmd/go: -benchtime flag should be cacheable Feb 23, 2021
@gopherbot
Copy link

Change https://golang.org/cl/304689 mentions this issue: cmd/go: add -benchtime to cacheable test flags

@golang golang locked and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants