Skip to content

Commit 38628f6

Browse files
committed
bench/rttanalysis: skip BenchmarkShowGrants under short configs
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: #151653 Release note: None
1 parent a491fd9 commit 38628f6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pkg/bench/rttanalysis/grant_revoke_role_bench_test.go

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

66
package rttanalysis
77

8-
import "testing"
8+
import (
9+
"testing"
10+
11+
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
12+
)
913

1014
func BenchmarkGrantRole(b *testing.B) { reg.Run(b) }
1115
func init() {
@@ -28,7 +32,11 @@ CREATE ROLE c;`,
2832
})
2933
}
3034

31-
func BenchmarkShowGrants(b *testing.B) { reg.Run(b) }
35+
func BenchmarkShowGrants(b *testing.B) {
36+
skip.UnderShort(b, "skipping long benchmark")
37+
reg.Run(b)
38+
}
39+
3240
func init() {
3341
reg.Register("ShowGrants", []RoundTripBenchTestCase{
3442
{

0 commit comments

Comments
 (0)