Improve pprof doc (#20463)

This commit is contained in:
wxiaoguang authored and GitHub committed 2022-07-24 01:33:55 +08:00
1 parent 3310dd1d19
commit 91f1c285a1
3 files changed
+7 -5

No files matched your search

+2 -1
View File
@@ -148,8 +148,9 @@ func runWeb(ctx *cli.Context) error {
go func() {
http.DefaultServeMux.Handle("/debug/fgprof", fgprof.Handler())
_, _, finished := process.GetManager().AddTypedContext(context.Background(), "Web: PProf Server", process.SystemProcessType, true)
// The pprof server is for debug purpose only, it shouldn't be exposed on public network. At the moment it's not worth to introduce a configurable option for it.
log.Info("Starting pprof server on localhost:6060")
log.Info("%v", http.ListenAndServe("localhost:6060", nil))
log.Info("Stopped pprof server: %v", http.ListenAndServe("localhost:6060", nil))
finished()
}()
}