Set GOMAXPROCS before log message

Previously the impression was being given that GOMAXPROCS was not being
set correctly.
pull/4771/head
Philip O'Toole 2015-11-12 13:28:35 -08:00
parent f56f3ae1e0
commit dc609b06fd
1 changed files with 3 additions and 3 deletions

View File

@ -67,14 +67,14 @@ func (cmd *Command) Run(args ...string) error {
// Print sweet InfluxDB logo.
fmt.Print(logo)
// Set parallelism.
runtime.GOMAXPROCS(runtime.NumCPU())
// Mark start-up in log.
log.Printf("InfluxDB starting, version %s, branch %s, commit %s, built %s",
cmd.Version, cmd.Branch, cmd.Commit, cmd.BuildTime)
log.Printf("Go version %s, GOMAXPROCS set to %d", runtime.Version(), runtime.GOMAXPROCS(0))
// Set parallelism.
runtime.GOMAXPROCS(runtime.NumCPU())
// Write the PID file.
if err := cmd.writePIDFile(options.PIDFile); err != nil {
return fmt.Errorf("write pid file: %s", err)