diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-20 23:45:37 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-20 23:45:37 +0800 |
commit | 8830403acfea745bd5e256d1498727e9128f02ae (patch) | |
tree | 976ba0d64a1b820de16f9445773fadfe1dee0e00 /cmd/geth | |
parent | 76025cc4245f0abc0749f4d1e433be865107bf24 (diff) | |
download | dexon-8830403acfea745bd5e256d1498727e9128f02ae.tar.gz dexon-8830403acfea745bd5e256d1498727e9128f02ae.tar.zst dexon-8830403acfea745bd5e256d1498727e9128f02ae.zip |
cmd/geth, cmd/utils: add cli flags for pprof and whisper.
Diffstat (limited to 'cmd/geth')
-rw-r--r-- | cmd/geth/main.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go index fa6a93b78..de1a59772 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -24,8 +24,6 @@ import ( "bufio" "fmt" "io/ioutil" - "log" - "net/http" "os" "runtime" "strconv" @@ -236,6 +234,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.RPCEnabledFlag, utils.RPCListenAddrFlag, utils.RPCPortFlag, + utils.WhisperEnabledFlag, utils.VMDebugFlag, utils.ProtocolVersionFlag, utils.NetworkIdFlag, @@ -246,6 +245,8 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso utils.LogVModuleFlag, utils.LogFileFlag, utils.LogJSONFlag, + utils.PProfEnabledFlag, + utils.PProfPortFlag, } // missing: @@ -260,11 +261,6 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso } func main() { - // Start up the default http server for pprof - go func() { - log.Println(http.ListenAndServe("localhost:6060", nil)) - }() - fmt.Printf("Welcome to the FRONTIER\n") runtime.GOMAXPROCS(runtime.NumCPU()) defer logger.Flush() @@ -336,6 +332,11 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, account string) (pass } func startEth(ctx *cli.Context, eth *eth.Ethereum) { + // Start profiling, if requested + if ctx.GlobalBool(utils.PProfEnabledFlag.Name) { + utils.StartPProf(ctx) + } + // Start Ethereum itself utils.StartEthereum(eth) am := eth.AccountManager() |