Skip to content

Commit

Permalink
Remove manual setting of GOMAXPROCS in main.go.
Browse files Browse the repository at this point in the history
This is no longer necessary since go 1.5 does it by default.
  • Loading branch information
bdarnell committed Sep 10, 2015
1 parent 8ec92c5 commit 97cebaa
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,14 @@ import (
"fmt"
"math/rand"
"os"
"runtime"

"github.com/cockroachdb/cockroach/cli"
"github.com/cockroachdb/cockroach/util/log"
"github.com/cockroachdb/cockroach/util/randutil"
)

func main() {
// Instruct Go to use all CPU cores.
// TODO(spencer): this may be excessive and result in worse
// performance. We should keep an eye on this as we move to
// production workloads.
numCPU := runtime.NumCPU()
runtime.GOMAXPROCS(numCPU)
// Seed the math/rand RNG from crypto/rand.
rand.Seed(randutil.NewPseudoSeed())
if log.V(1) {
log.Infof("running using %d processor cores", numCPU)
}

if len(os.Args) == 1 {
os.Args = append(os.Args, "help")
Expand Down

0 comments on commit 97cebaa

Please sign in to comment.