1
0
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:
Vladimir Mihailenco
2020-09-11 15:52:38 +03:00
parent afb0064872
commit cbce5dbfa2
6 changed files with 65 additions and 57 deletions

View File

@ -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) {