mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Fix utils.AdjustGoMaxProcs
Since Go 1.5, Go will use the total number of logical processers that the system has available. Caveats to this are if someone has set the GOMAXPROCS env var set or wish to limit usage of the number of logical processers between a range from 1 to NumCPUs
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"runtime"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -293,6 +294,9 @@ func (e *Engine) Start() error {
|
||||
e.Uptime = time.Now()
|
||||
log.Debugf(log.Global, "Bot '%s' started.\n", e.Config.Name)
|
||||
log.Debugf(log.Global, "Using data dir: %s\n", e.Settings.DataDir)
|
||||
log.Debugf(log.Global,
|
||||
"Using %d out of %d logical processors for runtime performance\n",
|
||||
runtime.GOMAXPROCS(-1), runtime.NumCPU())
|
||||
|
||||
enabledExchanges := e.Config.CountEnabledExchanges()
|
||||
if e.Settings.EnableAllExchanges {
|
||||
|
||||
Reference in New Issue
Block a user