cmd/bench: run only BenchmarkGoToDefinition for benchmark tests

For the matter of experimenting, we only run BenchmarkGoToDefinition benchmark test now. Once the perf dashboard show BenchmarkGoToDefinition results, this restriction will be lifted in the future.

Change-Id: I4bd07529c2652d3779ea04297355a40fcb6e511b
Reviewed-by: Michael Pratt <>
TryBot-Result: Gopher Robot <>
diff --git a/cmd/bench/gotest.go b/cmd/bench/gotest.go
index caa8c88..67c7a38 100644
--- a/cmd/bench/gotest.go
+++ b/cmd/bench/gotest.go
@@ -29,7 +29,7 @@
 		fmt.Printf("toolchain: %s\n", tc.Name)
 		for _, dir := range dirs {
-			err := tc.Do(filepath.Join(dir, "gopls"), "test", "-v", "-bench=.", "./internal/regtest/bench/", "-count=5")
+			err := tc.Do(filepath.Join(dir, "gopls"), "test", "-v", "-bench=BenchmarkGoToDefinition", "./gopls/internal/regtest/bench/", "-count=5")
 			if err != nil {
 				log.Printf("Error: %v", err)
 				return fmt.Errorf("error running sub-repo %s benchmark with toolchain %s in dir %s: %w", subRepo, tc.Name, dir, err)