[PR #801] [MERGED] Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060 #15581

Closed
opened 2025-11-02 11:49:54 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/801
Author: @metalmatze
Created: 1/30/2017
Status: Merged
Merged: 2/5/2017
Merged by: @lunny

Base: masterHead: feature/pprof


📝 Commits (2)

  • e342fdc Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060
  • 69f4c1e Add comment for golint to blank pprof import

📊 Changes

2 files changed (+10 additions, -1 deletions)

View changed files

📝 cmd/web.go (+7 -0)
📝 modules/setting/setting.go (+3 -1)

📄 Description

For #753 I want a simple way for people to enable pprof so they can debug with our help, or on their own, growing memory consumption or CPU usage.

For that I added ENABLE_PPROF to the app.ini.

[server]
ROOT_URL         = http://localhost:3000/
...
ENABLE_PPROF     = true

If set to true gitea will start pprof on localhost:6060 with the gitea web command.

https://blog.golang.org/profiling-go-programs
https://golang.org/pkg/net/http/pprof/


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/801 **Author:** [@metalmatze](https://github.com/metalmatze) **Created:** 1/30/2017 **Status:** ✅ Merged **Merged:** 2/5/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `feature/pprof` --- ### 📝 Commits (2) - [`e342fdc`](https://github.com/go-gitea/gitea/commit/e342fdc3e634e75e33c465afddf5e85dab04d760) Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060 - [`69f4c1e`](https://github.com/go-gitea/gitea/commit/69f4c1ed04a1d8e3118bbb06feceeee0d15cc250) Add comment for golint to blank pprof import ### 📊 Changes **2 files changed** (+10 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cmd/web.go` (+7 -0) 📝 `modules/setting/setting.go` (+3 -1) </details> ### 📄 Description For #753 I want a simple way for people to enable pprof so they can debug with our help, or on their own, growing memory consumption or CPU usage. For that I added `ENABLE_PPROF` to the `app.ini`. ``` [server] ROOT_URL = http://localhost:3000/ ... ENABLE_PPROF = true ``` If set to true gitea will start pprof on localhost:6060 with the `gitea web` command. https://blog.golang.org/profiling-go-programs https://golang.org/pkg/net/http/pprof/ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:49:54 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15581