summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthias Loibl <mail@matthiasloibl.com>2017-02-05 14:06:25 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-05 21:06:25 +0800
commit17c5e12e6e66da987677384dc734da7c69d1104e (patch)
treea8350011ed0999156ab4ab035a39f6dddab05c5d /modules
parentc73b7a65f5ca4ce580694cf5b4a38b0d2893231a (diff)
downloadgitea-17c5e12e6e66da987677384dc734da7c69d1104e.tar.gz
gitea-17c5e12e6e66da987677384dc734da7c69d1104e.zip
Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060 (#801)
* Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060 * Add comment for golint to blank pprof import
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 51f5c2a454..1cbb3eac0a 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -30,7 +30,7 @@ import (
_ "github.com/go-macaron/cache/redis"
"github.com/go-macaron/session"
_ "github.com/go-macaron/session/redis" // redis plugin for store session
- "gopkg.in/ini.v1"
+ ini "gopkg.in/ini.v1"
"strk.kbt.io/projects/go/libravatar"
)
@@ -79,6 +79,7 @@ var (
EnableGzip bool
LandingPageURL LandingPage
UnixSocketPermission uint32
+ EnablePprof bool
SSH = struct {
Disabled bool `ini:"DISABLE_SSH"`
@@ -591,6 +592,7 @@ please consider changing to GITEA_CUSTOM`)
StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(workDir)
AppDataPath = sec.Key("APP_DATA_PATH").MustString("data")
EnableGzip = sec.Key("ENABLE_GZIP").MustBool()
+ EnablePprof = sec.Key("ENABLE_PPROF").MustBool(false)
switch sec.Key("LANDING_PAGE").MustString("home") {
case "explore":