From bae4ed58e484073ecd1a7f73a571c50e7ccb246c Mon Sep 17 00:00:00 2001 From: siddontang Date: Fri, 24 Oct 2014 20:32:49 +0800 Subject: [PATCH] benchmark add GOMAXPROCS --- cmd/ledis-benchmark/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/ledis-benchmark/main.go b/cmd/ledis-benchmark/main.go index dad16f2..8f7d65d 100644 --- a/cmd/ledis-benchmark/main.go +++ b/cmd/ledis-benchmark/main.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/siddontang/ledisdb/client/go/ledis" "math/rand" + "runtime" "sync" "sync/atomic" "time" @@ -246,6 +247,8 @@ func benchZRevRangeByRank() { } func main() { + runtime.GOMAXPROCS(runtime.NumCPU()) + flag.Parse() if *number <= 0 {