aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 8c7c026172..43bb0ada91 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -21,6 +21,7 @@ import (
"code.gitea.io/gitea/routers"
"code.gitea.io/gitea/routers/install"
+ "github.com/felixge/fgprof"
"github.com/urfave/cli"
ini "gopkg.in/ini.v1"
)
@@ -145,6 +146,7 @@ func runWeb(ctx *cli.Context) error {
if setting.EnablePprof {
go func() {
+ http.DefaultServeMux.Handle("/debug/fgprof", fgprof.Handler())
_, _, finished := process.GetManager().AddTypedContext(context.Background(), "Web: PProf Server", process.SystemProcessType, true)
log.Info("Starting pprof server on localhost:6060")
log.Info("%v", http.ListenAndServe("localhost:6060", nil))