Skip to content

Commit 4ed7de1

Browse files
committed
gopls: add google-cloud-go as a benchmark repo
This repo is large, and exercises use-cases with many workspace modules. For golang/go#60089 Change-Id: I93b9c99ce52bd7ae25f65fdb9bf0568c25375411 Reviewed-on: https://go-review.googlesource.com/c/tools/+/494096 Reviewed-by: Alan Donovan <[email protected]> gopls-CI: kokoro <[email protected]> Run-TryBot: Robert Findley <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent d799eba commit 4ed7de1

File tree

8 files changed

+19
-4
lines changed

8 files changed

+19
-4
lines changed

gopls/internal/regtest/bench/definition_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ func BenchmarkDefinition(b *testing.B) {
1515
regexp string
1616
}{
1717
{"istio", "pkg/config/model.go", `gogotypes\.(MarshalAny)`},
18+
{"google-cloud-go", "httpreplay/httpreplay.go", `proxy\.(ForRecording)`},
1819
{"kubernetes", "pkg/controller/lookup_cache.go", `hashutil\.(DeepHashObject)`},
1920
{"kuma", "api/generic/insights.go", `proto\.(Message)`},
2021
{"pkgsite", "internal/log/log.go", `derrors\.(Wrap)`},

gopls/internal/regtest/bench/didchange_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var didChangeTests = []struct {
2323
repo string
2424
file string
2525
}{
26+
{"google-cloud-go", "httpreplay/httpreplay.go"},
2627
{"istio", "pkg/fuzz/util.go"},
2728
{"kubernetes", "pkg/controller/lookup_cache.go"},
2829
{"kuma", "api/generic/insights.go"},

gopls/internal/regtest/bench/hover_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ func BenchmarkHover(b *testing.B) {
1414
file string
1515
regexp string
1616
}{
17+
{"google-cloud-go", "httpreplay/httpreplay.go", `proxy\.(ForRecording)`},
1718
{"istio", "pkg/config/model.go", `gogotypes\.(MarshalAny)`},
1819
{"kubernetes", "pkg/apis/core/types.go", "type (Pod)"},
1920
{"kuma", "api/generic/insights.go", `proto\.(Message)`},

gopls/internal/regtest/bench/implementations_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ func BenchmarkImplementations(b *testing.B) {
1212
file string
1313
regexp string
1414
}{
15+
{"google-cloud-go", "httpreplay/httpreplay.go", `type (Recorder)`},
1516
{"istio", "pkg/config/mesh/watcher.go", `type (Watcher)`},
1617
{"kubernetes", "pkg/controller/lookup_cache.go", `objectWithMeta`},
1718
{"kuma", "api/generic/insights.go", `type (Insight)`},

gopls/internal/regtest/bench/iwl_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ func BenchmarkInitialWorkspaceLoad(b *testing.B) {
2020
repo string
2121
file string
2222
}{
23-
{"tools", "internal/lsp/cache/snapshot.go"},
23+
{"google-cloud-go", "httpreplay/httpreplay.go"},
24+
{"istio", "pkg/fuzz/util.go"},
2425
{"kubernetes", "pkg/controller/lookup_cache.go"},
26+
{"kuma", "api/generic/insights.go"},
2527
{"pkgsite", "internal/frontend/server.go"},
2628
{"starlark", "starlark/eval.go"},
27-
{"istio", "pkg/fuzz/util.go"},
28-
{"kuma", "api/generic/insights.go"},
29+
{"tools", "internal/lsp/cache/snapshot.go"},
2930
}
3031

3132
for _, test := range tests {

gopls/internal/regtest/bench/references_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ func BenchmarkReferences(b *testing.B) {
1212
file string
1313
regexp string
1414
}{
15+
{"google-cloud-go", "httpreplay/httpreplay.go", `func (NewRecorder)`},
1516
{"istio", "pkg/config/model.go", "type (Meta)"},
1617
{"kubernetes", "pkg/controller/lookup_cache.go", "type (objectWithMeta)"},
1718
{"kuma", "pkg/events/interfaces.go", "type (Event)"},

gopls/internal/regtest/bench/rename_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ func BenchmarkRename(b *testing.B) {
1616
regexp string
1717
baseName string
1818
}{
19+
{"google-cloud-go", "httpreplay/httpreplay.go", `func (NewRecorder)`, "NewRecorder"},
20+
{"istio", "pkg/config/model.go", `(Namespace) string`, "Namespace"},
1921
{"kubernetes", "pkg/controller/lookup_cache.go", `hashutil\.(DeepHashObject)`, "DeepHashObject"},
2022
{"kuma", "pkg/events/interfaces.go", `Delete`, "Delete"},
21-
{"istio", "pkg/config/model.go", `(Namespace) string`, "Namespace"},
2223
{"pkgsite", "internal/log/log.go", `func (Infof)`, "Infof"},
2324
{"starlark", "starlark/eval.go", `Program\) (Filename)`, "Filename"},
2425
{"tools", "internal/lsp/cache/snapshot.go", `meta \*(metadataGraph)`, "metadataGraph"},

gopls/internal/regtest/bench/repo_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ import (
2626
// These repos were selected to represent a variety of different types of
2727
// codebases.
2828
var repos = map[string]*repo{
29+
// google-cloud-go has 145 workspace modules (!), and is quite large.
30+
"google-cloud-go": {
31+
name: "google-cloud-go",
32+
url: "https://github.com/googleapis/google-cloud-go.git",
33+
commit: "07da765765218debf83148cc7ed8a36d6e8921d5",
34+
inDir: flag.String("cloud_go_dir", "", "if set, reuse this directory as google-cloud-go@07da7657"),
35+
},
36+
2937
// Used by x/benchmarks; large.
3038
"istio": {
3139
name: "istio",

0 commit comments

Comments
 (0)