func doPing(client redis.Client, cnt int) (delta int64) { t0 := time.Nanoseconds() for i := 0; i < cnt; i++ { client.Ping() } delta = time.Nanoseconds() - t0 client.Flushdb() return }
func doPing(client redis.Client, cnt int) (delta time.Duration) { t0 := time.Now() for i := 0; i < cnt; i++ { client.Ping() } delta = time.Now().Sub(t0) client.Flushdb() return }
func doPing (id string, signal chan int, client redis.Client, cnt int) { for i:=0;i<cnt;i++ { client.Ping(); } signal <- 1; }