mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 16:37:39 +00:00
allow setting GOMAXPROCS from environment variable (#12256)
* allow setting GOMAXPROCS from environment variable * remove unused import
This commit is contained in:
parent
763e9e3361
commit
6b1efff4e8
@ -5,7 +5,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
|
||||||
runtimeDebug "runtime/debug"
|
runtimeDebug "runtime/debug"
|
||||||
|
|
||||||
gethlog "github.com/ethereum/go-ethereum/log"
|
gethlog "github.com/ethereum/go-ethereum/log"
|
||||||
@ -198,7 +197,6 @@ func main() {
|
|||||||
if ctx.IsSet(flags.SetGCPercent.Name) {
|
if ctx.IsSet(flags.SetGCPercent.Name) {
|
||||||
runtimeDebug.SetGCPercent(ctx.Int(flags.SetGCPercent.Name))
|
runtimeDebug.SetGCPercent(ctx.Int(flags.SetGCPercent.Name))
|
||||||
}
|
}
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
|
||||||
if err := debug.Setup(ctx); err != nil {
|
if err := debug.Setup(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
|
||||||
runtimeDebug "runtime/debug"
|
runtimeDebug "runtime/debug"
|
||||||
|
|
||||||
joonix "github.com/joonix/log"
|
joonix "github.com/joonix/log"
|
||||||
@ -183,7 +182,6 @@ func main() {
|
|||||||
log.WithError(err).Error("Cannot update data directory")
|
log.WithError(err).Error("Cannot update data directory")
|
||||||
}
|
}
|
||||||
|
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
|
||||||
if err := debug.Setup(ctx); err != nil {
|
if err := debug.Setup(ctx); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user