func doLpush(id string, signal chan int, client redis.Client, cnt int) { key := "list-L-" + id value := []byte("foo") for i := 0; i < cnt; i++ { client.Lpush(key, value) } signal <- 1 }
func doRpush(client redis.Client, cnt int) (delta time.Duration) { key := "list-R" value := []byte("foo") t0 := time.Now() for i := 0; i < cnt; i++ { client.Lpush(key, value) } delta = time.Now().Sub(t0) return }