Exemplo n.º 1
0
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
}
Exemplo n.º 2
0
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
}
Exemplo n.º 3
0
func doPing (id string, signal chan int, client redis.Client, cnt int)  {
	for i:=0;i<cnt;i++ { 
		client.Ping();
	}
	signal <- 1;
}