update benchmark

This commit is contained in:
siddontang 2014-10-24 23:20:42 +08:00
parent 688d697bb7
commit 3c38beb62d
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ func bench(cmd string, f func()) {
t2 := time.Now() t2 := time.Now()
d := t2.Sub(t1) d := t2.Sub(t1)
fmt.Printf("%s: %0.3f micros/op, %0.2fmb/s\n", cmd, float64(d.Nanoseconds()/1e3)/float64(*number), fmt.Printf("%s: %0.3f micros/op, %0.2fmb/s %0.2fop/s\n", cmd, float64(d.Nanoseconds()/1e3)/float64(*number),
float64((*valueSize+16)*(*number))/(1024.0*1024.0*(d.Seconds()))) float64((*valueSize+16)*(*number))/(1024.0*1024.0*(d.Seconds())), float64(*number)/d.Seconds())
} }
var kvSetBase int64 = 0 var kvSetBase int64 = 0