(b *testing.B)
| 71 | } |
| 72 | |
| 73 | func BenchmarkRedisGetNil(b *testing.B) { |
| 74 | ctx := context.Background() |
| 75 | client := benchmarkRedisClient(ctx, 10) |
| 76 | defer client.Close() |
| 77 | |
| 78 | b.ResetTimer() |
| 79 | |
| 80 | b.RunParallel(func(pb *testing.PB) { |
| 81 | for pb.Next() { |
| 82 | if err := client.Get(ctx, "key").Err(); err != redis.Nil { |
| 83 | b.Fatal(err) |
| 84 | } |
| 85 | } |
| 86 | }) |
| 87 | } |
| 88 | |
| 89 | type setStringBenchmark struct { |
| 90 | poolSize int |
nothing calls this directly
no test coverage detected