mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add Sentinel RouteBy
This commit is contained in:
@ -305,31 +305,6 @@ func BenchmarkClusterSetString(b *testing.B) {
|
||||
})
|
||||
}
|
||||
|
||||
func BenchmarkClusterReloadState(b *testing.B) {
|
||||
if testing.Short() {
|
||||
b.Skip("skipping in short mode")
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
cluster := newClusterScenario()
|
||||
if err := startCluster(ctx, cluster); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
defer cluster.Close()
|
||||
|
||||
client := cluster.newClusterClient(ctx, redisClusterOptions())
|
||||
defer client.Close()
|
||||
|
||||
b.ResetTimer()
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
err := client.ReloadState(ctx)
|
||||
if err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var clusterSink *redis.ClusterClient
|
||||
|
||||
func BenchmarkClusterWithContext(b *testing.B) {
|
||||
|
Reference in New Issue
Block a user