mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +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"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/ethereum/go-ethereum/internal/debug"
|
||||
"net"
|
||||
"net/http"
|
||||
"os/signal"
|
||||
|
|
@ -105,7 +106,7 @@ var (
|
|||
|
||||
func init() {
|
||||
app.Action = shisui
|
||||
app.Flags = slices.Concat(portalProtocolFlags, historyRpcFlags, metricsFlags)
|
||||
app.Flags = slices.Concat(portalProtocolFlags, historyRpcFlags, metricsFlags, debug.Flags)
|
||||
flags.AutoEnvVars(app.Flags, "SHISUI")
|
||||
}
|
||||
|
||||
|
|
@ -121,6 +122,9 @@ func shisui(ctx *cli.Context) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
go func() {
|
||||
debug.Setup(ctx)
|
||||
}()
|
||||
|
||||
// Start metrics export if enabled
|
||||
utils.SetupMetrics(ctx)
|
||||
|
|
|
|||
Loading…
Reference in a new issue