update benchmark

This commit is contained in:
siddontang 2014-10-28 23:23:30 +08:00
parent fdeda83a37
commit e36cc553ec
1 changed files with 4 additions and 6 deletions

View File

@ -29,9 +29,9 @@ func waitBench(cmd string, args ...interface{}) {
c := client.Get()
defer c.Close()
_, err := c.Do(cmd, args...)
_, err := c.Do(strings.ToUpper(cmd), args...)
if err != nil {
fmt.Printf("do %s error %s", cmd, err.Error())
fmt.Printf("do %s error %s\n", cmd, err.Error())
return
}
}
@ -88,7 +88,7 @@ func benchGet() {
func benchRandGet() {
f := func() {
n := rand.Int()
n := rand.Int() % *number
waitBench("get", n)
}
@ -172,7 +172,7 @@ func benchHGet() {
func benchHRandGet() {
f := func() {
n := rand.Int()
n := rand.Int() % *number
waitBench("hget", "myhashkey", n)
}
@ -288,8 +288,6 @@ func main() {
runAll = false
}
println(*tests, len(ts))
needTest := make(map[string]struct{})
for _, s := range ts {
needTest[strings.ToLower(s)] = struct{}{}