func doLpop (id string, signal chan int, client redis.Client, cnt int) { key := "list-L-" + id; for i:=0;i<cnt;i++ { client.Lpop(key); } signal <- 1; }
func doRpop(client redis.Client, cnt int) (delta int64) { key := "list-R" t0 := time.Nanoseconds() for i := 0; i < cnt; i++ { client.Lpop(key) } delta = time.Nanoseconds() - t0 return }
func doRpop(client redis.Client, cnt int) (delta time.Duration) { key := "list-R" t0 := time.Now() for i := 0; i < cnt; i++ { client.Lpop(key) } delta = time.Now().Sub(t0) return }