mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Improve benchmark
This commit is contained in:
@ -3,6 +3,7 @@ package redis_test
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
@ -134,7 +135,8 @@ var _ = Describe("Pool", func() {
|
|||||||
|
|
||||||
func BenchmarkPool(b *testing.B) {
|
func BenchmarkPool(b *testing.B) {
|
||||||
client := redis.NewClient(&redis.Options{
|
client := redis.NewClient(&redis.Options{
|
||||||
Addr: redisAddr,
|
Addr: redisAddr,
|
||||||
|
IdleTimeout: 100 * time.Millisecond,
|
||||||
})
|
})
|
||||||
defer client.Close()
|
defer client.Close()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user