func doLpush (id string, signal chan int, client redis.Client, cnt int) { key := "list-L-" + id; value := strings.Bytes("foo"); for i:=0;i<cnt;i++ { client.Lpush(key, value); } signal <- 1; }
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 int64) { key := "list-R" value := strings.Bytes("foo") t0 := time.Nanoseconds() for i := 0; i < cnt; i++ { client.Lpush(key, value) } delta = time.Nanoseconds() - t0 return }
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 }