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:
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user