Exemple #1
0
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
}
Exemple #3
0
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
}
Exemple #4
-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
}