1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

chore: remove WithContext

This commit is contained in:
Vladimir Mihailenco
2022-06-05 09:58:05 +03:00
parent 0768a688c6
commit 4ddd7d1803
10 changed files with 2 additions and 147 deletions

View File

@ -273,36 +273,6 @@ func BenchmarkXRead(b *testing.B) {
})
}
var clientSink *redis.Client
func BenchmarkWithContext(b *testing.B) {
ctx := context.Background()
rdb := benchmarkRedisClient(ctx, 10)
defer rdb.Close()
b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
clientSink = rdb.WithContext(ctx)
}
}
var ringSink *redis.Ring
func BenchmarkRingWithContext(b *testing.B) {
ctx := context.Background()
rdb := redis.NewRing(&redis.RingOptions{})
defer rdb.Close()
b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
ringSink = rdb.WithContext(ctx)
}
}
//------------------------------------------------------------------------------
func newClusterScenario() *clusterScenario {
@ -395,18 +365,3 @@ func BenchmarkClusterSetString(b *testing.B) {
}
})
}
var clusterSink *redis.ClusterClient
func BenchmarkClusterWithContext(b *testing.B) {
ctx := context.Background()
rdb := redis.NewClusterClient(&redis.ClusterOptions{})
defer rdb.Close()
b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
clusterSink = rdb.WithContext(ctx)
}
}