gopls/internal/regtest/bench: add an oracle completion benchmark
The enormous dataintegration package in oracle demonstrates a clear
regression from gopls@v0.11.0 in completion CPU utilization during
autocompletion.
On my machine latency appears about the same, but on more
resource-constrained machines this may not be the case.
For golang/go#61207
Change-Id: I59631f34fe0d8d5d3329c9444d4e485840ad85ed
Reviewed-on: https://go-review.googlesource.com/c/tools/+/516678
TryBot-Result: Gopher Robot <gobot@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/gopls/internal/regtest/bench/completion_test.go b/gopls/internal/regtest/bench/completion_test.go
index a0cf5a0..0400e70 100644
--- a/gopls/internal/regtest/bench/completion_test.go
+++ b/gopls/internal/regtest/bench/completion_test.go
@@ -180,6 +180,18 @@
`,
`kl\.()`,
},
+ {
+ "oracle",
+ "dataintegration/pivot2.go",
+ `
+package dataintegration
+
+func (p *Pivot) _() {
+ p.
+}
+`,
+ `p\.()`,
+ },
}
for _, test := range tests {