mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-09 13:33:50 +00:00
feat: pprof
This commit is contained in:
parent
685123294b
commit
77e6dc181c
1 changed files with 5 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/ethereum/go-ethereum/internal/debug"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
|
@ -105,7 +106,7 @@ var (
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
app.Action = shisui
|
app.Action = shisui
|
||||||
app.Flags = slices.Concat(portalProtocolFlags, historyRpcFlags, metricsFlags)
|
app.Flags = slices.Concat(portalProtocolFlags, historyRpcFlags, metricsFlags, debug.Flags)
|
||||||
flags.AutoEnvVars(app.Flags, "SHISUI")
|
flags.AutoEnvVars(app.Flags, "SHISUI")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,6 +122,9 @@ func shisui(ctx *cli.Context) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
go func() {
|
||||||
|
debug.Setup(ctx)
|
||||||
|
}()
|
||||||
|
|
||||||
// Start metrics export if enabled
|
// Start metrics export if enabled
|
||||||
utils.SetupMetrics(ctx)
|
utils.SetupMetrics(ctx)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue