chainwatch: add http server for pprof

This commit is contained in:
Travis Person 2020-07-22 19:54:52 +00:00
parent 67a1b3e382
commit 89c9938013
2 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,6 @@
package main
import (
_ "net/http/pprof"
"os"
"github.com/filecoin-project/lotus/build"

View File

@ -2,6 +2,8 @@ package main
import (
"database/sql"
"net/http"
_ "net/http/pprof"
"os"
_ "github.com/lib/pq"
@ -25,6 +27,9 @@ var runCmd = &cli.Command{
},
},
Action: func(cctx *cli.Context) error {
go func() {
http.ListenAndServe(":6060", nil)
}()
ll := cctx.String("log-level")
if err := logging.SetLogLevel("*", ll); err != nil {
return err