Improve benchmark

This commit is contained in:
Dimitrij Denissenko 2015-01-31 12:01:21 +00:00
parent fe4c2d4918
commit c3ab344f84
1 changed files with 3 additions and 1 deletions

View File

@ -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"
@ -135,6 +136,7 @@ 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()