Beispiel #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;
}
Beispiel #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
}
Beispiel #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
}