作者:carriercom
项目:redis-
func BenchmarkTcglRedisLRange100(b *testing.B) {
var res *redis.ResultSet
for i := 0; i < b.N; i++ {
res = tcglRedisClient.Command("LRANGE", "hello", 0, 100)
if res.Error() != nil {
b.Fatalf(res.Error().Error())
break
}
}
}
作者:carriercom
项目:redis-
func BenchmarkTcglRedisIncr(b *testing.B) {
var res *redis.ResultSet
for i := 0; i < b.N; i++ {
res = tcglRedisClient.Command("INCR", "hello")
if res.Error() != nil {
b.Fatalf(res.Error().Error())
break
}
}
}
作者:carriercom
项目:redis-
func BenchmarkTcglRedisLPush(b *testing.B) {
var res *redis.ResultSet
tcglRedisClient.Command("DEL", "hello")
for i := 0; i < b.N; i++ {
res = tcglRedisClient.Command("LPUSH", "hello", i)
if res.Error() != nil {
b.Fatalf(res.Error().Error())
break
}
}
}