diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-13 21:41:38 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-13 21:41:38 +0900 |
commit | c5fcffd18aad35399aeee8ff1f12233c6fa430c2 (patch) | |
tree | 8328d2f3a80626d58eba087600fac7430f7b80e5 /gobgpd | |
parent | 05d86aada38369b97f7331c8863bd21aa0057061 (diff) |
add net/http/pprof support
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'gobgpd')
-rw-r--r-- | gobgpd/main.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go index 03912546..fd657c3f 100644 --- a/gobgpd/main.go +++ b/gobgpd/main.go @@ -24,6 +24,8 @@ import ( "github.com/osrg/gobgp/server" "io/ioutil" "log/syslog" + "net/http" + _ "net/http/pprof" "os" "os/signal" "runtime" @@ -59,6 +61,10 @@ func main() { runtime.GOMAXPROCS(opts.CPUs) } + go func() { + log.Println(http.ListenAndServe("localhost:6060", nil)) + }() + switch opts.LogLevel { case "debug": log.SetLevel(log.DebugLevel) |