Esempio n. 1
0
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;
}
Esempio n. 2
0
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
}
Esempio n. 3
0
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
}