aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/dexcon-simulation-with-scheduler/main.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-11-01 09:07:28 +0800
committerGitHub <noreply@github.com>2018-11-01 09:07:28 +0800
commit96a8c333f47dff1db938ee93155d55413fa70799 (patch)
treeaaa845dcf54aa2b08d68badfb98ab8b808da9945 /cmd/dexcon-simulation-with-scheduler/main.go
parent6f33d1e0bbf7d976bd14d3dffd35e4e40a78a0c2 (diff)
downloadtangerine-consensus-96a8c333f47dff1db938ee93155d55413fa70799.tar
tangerine-consensus-96a8c333f47dff1db938ee93155d55413fa70799.tar.gz
tangerine-consensus-96a8c333f47dff1db938ee93155d55413fa70799.tar.bz2
tangerine-consensus-96a8c333f47dff1db938ee93155d55413fa70799.tar.lz
tangerine-consensus-96a8c333f47dff1db938ee93155d55413fa70799.tar.xz
tangerine-consensus-96a8c333f47dff1db938ee93155d55413fa70799.tar.zst
tangerine-consensus-96a8c333f47dff1db938ee93155d55413fa70799.zip
Add pprof to dexcon commands (#282)
Diffstat (limited to 'cmd/dexcon-simulation-with-scheduler/main.go')
-rw-r--r--cmd/dexcon-simulation-with-scheduler/main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/dexcon-simulation-with-scheduler/main.go b/cmd/dexcon-simulation-with-scheduler/main.go
index eeee65c..5e04538 100644
--- a/cmd/dexcon-simulation-with-scheduler/main.go
+++ b/cmd/dexcon-simulation-with-scheduler/main.go
@@ -5,6 +5,8 @@ import (
"log"
"math"
"math/rand"
+ "net/http"
+ _ "net/http/pprof"
"os"
"runtime"
"runtime/pprof"
@@ -24,7 +26,10 @@ var (
func main() {
flag.Parse()
rand.Seed(time.Now().UnixNano())
-
+ // Supports runtime pprof monitoring.
+ go func() {
+ log.Println(http.ListenAndServe("localhost:6060", nil))
+ }()
if *configFile == "" {
log.Fatal("error: no configuration file specified")
}