remove runtime.GOMAXPROCS

pull/1123/head
Minh Doan 5 years ago committed by Minh Doan
parent 9b466c811d
commit d6aac32bf4
  1. 4
      cmd/client/txgen/main.go
  2. 4
      cmd/harmony/main.go

@ -7,7 +7,6 @@ import (
"math/rand" "math/rand"
"os" "os"
"path" "path"
"runtime"
"sync" "sync"
"time" "time"
@ -135,8 +134,6 @@ func main() {
if *versionFlag { if *versionFlag {
printVersion(os.Args[0]) printVersion(os.Args[0])
} }
// Add GOMAXPROCS to achieve max performance.
runtime.GOMAXPROCS(1024)
// Logging setup // Logging setup
utils.SetLogContext(*port, *ip) utils.SetLogContext(*port, *ip)
utils.SetLogVerbosity(log.Lvl(*verbosity)) utils.SetLogVerbosity(log.Lvl(*verbosity))
@ -240,7 +237,6 @@ pushLoop:
select { select {
case shardID := <-readySignal: case shardID := <-readySignal:
lock := sync.Mutex{} lock := sync.Mutex{}
utils.GetLogInstance().Warn("STARTING TX GEN PUSH LOOP", "gomaxprocs", runtime.GOMAXPROCS(0))
txs, err := GenerateSimulatedTransactionsAccount(uint32(shardID), txGen, setting) txs, err := GenerateSimulatedTransactionsAccount(uint32(shardID), txGen, setting)
if err != nil { if err != nil {
utils.GetLogInstance().Debug("Error in Generating Txns", "Err", err) utils.GetLogInstance().Debug("Error in Generating Txns", "Err", err)

@ -7,7 +7,6 @@ import (
"math/rand" "math/rand"
"os" "os"
"path" "path"
"runtime"
"time" "time"
"github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/ethdb"
@ -149,9 +148,6 @@ func initSetup() {
// Set default keystore Dir // Set default keystore Dir
hmykey.DefaultKeyStoreDir = *keystoreDir hmykey.DefaultKeyStoreDir = *keystoreDir
// Add GOMAXPROCS to achieve max performance.
runtime.GOMAXPROCS(1024)
// Set up randomization seed. // Set up randomization seed.
rand.Seed(int64(time.Now().Nanosecond())) rand.Seed(int64(time.Now().Nanosecond()))

Loading…
Cancel
Save