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
x/tools,x/build: performance monitoring for gopls #53538
Comments
Change https://go.dev/cl/413915 mentions this issue: |
Change https://go.dev/cl/413687 mentions this issue: |
Change https://go.dev/cl/413686 mentions this issue: |
Regarding " Perhaps we should just have cmd/bench run go get golang.org/x/tools/gopls@latest? This is far simpler, though it diverges from how we handle the Go repo baseline (i.e., by doing it from the coordinator)" if this were outsourced to bent, autofetching at latest is the default if no version of the test repo is specified, but I don't know if the commit/date of the repo that it obtains is communicated to the database. |
Change https://go.dev/cl/419988 mentions this issue: |
Significantly refactor the gopls benchmarks to turn them into proper benchmarks, eliminate the need for passing flags, and allow running them on external gopls processes so that they may be used to test older gopls versions. Doing this required decoupling the benchmarks themselves from the regtest.Runner. Instead, they just create their own regtest.Env to use for scripting operations. In order to facilitate this, I tried to redefine Env as a convenience wrapper around other primitives. By using a separate environment setup for benchmarks, I was able to eliminate a lot of regtest.Options that existed only to prevent the regtest runner from adding instrumentation that would affect benchmarking. This also helped clean up Runner.Run somewhat, though it is still too complicated. Also eliminate the unused AnyDiagnosticAtCurrentVersion, and make a few other TODOs about future cleanup. For golang/go#53992 For golang/go#53538 Change-Id: Idbf923178d4256900c3c05bc8999c0c9839a3c07 Reviewed-on: https://go-review.googlesource.com/c/tools/+/419988 gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Peter Weinberger <pjw@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
With CL 419988, gopls benchmarks are now proper benchmarks, and can be run without any additional flags. For example:
Additionally, the benchmark suite can be used with an externally compiled version of gopls:
(the bit about checking out gopls/v0.9.0 may be confusing, I realize now: that's just an arbitrary |
This will appear in 0.9.2? I tested it, but "@latest" appeared to grab 0.9.1 which lacks the new code. |
Yes, that's correct. Can we use @master for benchmarks, actually? There is an additional fix that also isn't in v0.9.2 (which will be released today or tomorrow. |
prattmic commentedJun 24, 2022
•
edited by findleyr
#48803 tracks performance monitoring work in general, primarily targeting the main Go repo. x/tools folks would like to track performance for gopls, which is feasible with a bit of extra work.
The primary goal is to track the benchmarks in x/tools/gopls/internal/regtest/bench, with the latest tagged version of gopls as the baseline, a built using the latest stable Go toolchain.
Things we need to do to get there:
testing.T
tests that happen to print benchfmt output, but all with the same name. Current plan is to convert them to standardtesting.B
benchmarks.)In the Coordinator:
This will be an x/tools builder to get proper triggering. I think we still want to use x/benchmarks/cmd/bench, so builds will have to additionally checkout x/benchmarks.
In runBenchmarkTests:
Differentiate x/benchmarks runs (test Go repo) vs x/tools runs (test x/tools). For x/tools mode:
Add a new toolchain-commit benchfmt field for the Go toolchain version. For Go repo builds this will be the same as baseline-commit, but for x/tools we'll want to be able to see the toolchain version somehow.
In cmd/bench, when BENCH_REPO == tools, run something like
go test -bench=. -count=10 golang.org/x/tools/gopls/internal/regtest/bench/...
in experiment and baseline checkouts.On the frontend:
[1] We'll still end up with a tip toolchain checked out and built on the builder which we just ignore. This is useless extra work, but I'm not sure it is worth the extra complexity to avoid.
[2] Perhaps we should just have cmd/bench run
go get golang.org/x/tools/gopls@latest
? This is far simpler, though it diverges from how we handle the Go repo baseline (i.e., by doing it from the coordinator)cc @findleyr @mknyszek @dr2chase @aclements
The text was updated successfully, but these errors were encountered: