Skip to content

Commit f0dece7

Browse files
committed
bench/rttanalysis: skip BenchmarkSystemDatabaseQueries
Previously, this benchmark was included in CI runs and would take more than 20 minutes to complete a single iteration (--bench-time=1s --count=1). This is because the benchmark aims for a measured runtime of 1 second, but the unmeasured operations within each iteration take over 20 minutes combined to reach that target. This change skips the benchmark in CI runs. Fixes: #151298 Epic: None Release note: None
1 parent 0a7754f commit f0dece7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

pkg/bench/rttanalysis/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ go_test(
6767
"//pkg/server/serverpb",
6868
"//pkg/testutils/pgurlutils",
6969
"//pkg/testutils/serverutils",
70+
"//pkg/testutils/skip",
7071
"//pkg/testutils/testcluster",
7172
"//pkg/util/protoutil",
7273
"//pkg/util/randutil",

pkg/bench/rttanalysis/system_bench_test.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@
55

66
package rttanalysis
77

8-
import "testing"
8+
import (
9+
"testing"
10+
11+
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
12+
)
13+
14+
func BenchmarkSystemDatabaseQueries(b *testing.B) {
15+
skip.UnderShort(b, "skipping long benchmark")
16+
reg.Run(b)
17+
}
918

10-
func BenchmarkSystemDatabaseQueries(b *testing.B) { reg.Run(b) }
1119
func init() {
1220
reg.Register("SystemDatabaseQueries", []RoundTripBenchTestCase{
1321
// This query performs 1-2 lookups: getting the descriptor ID by Name, then

0 commit comments

Comments
 (0)