Merge pull request #2531 from filecoin-project/feat/chainwatch-debug

chainwatch: add http server for pprof
This commit is contained in:
Łukasz Magiera
2020-07-22 23:02:49 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
-1
View File
@@ -1,7 +1,6 @@
package main
import (
_ "net/http/pprof"
"os"
"github.com/filecoin-project/lotus/build"
+5
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