1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-04 17:10:19 +00:00

http support pprof and template add date func like php's date function

http support pprof
PprofOn set to true you can profile the runtime data.
template add date func like php's date function

{{date "Y-m-d H:i:s"}}
This commit is contained in:
xiemengjun
2013-01-01 21:42:16 +08:00
parent a02a64806e
commit 1f67fcb0f9
2 changed files with 50 additions and 0 deletions

View File

@ -332,6 +332,16 @@ beego has many default variables, as follow is a list to show:
- AppConfig *Config
Appconfig is a result that parse file from conf/app.conf, if this file not exist then the variable is nil. if the file exist, then return the Config as follow.
- PprofOn bool
default is false. turn on pprof, if set to true. you can visit like this:
/debug/pprof
/debug/pprof/cmdline
/debug/pprof/profile
/debug/pprof/symbol
this serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. For more information about pprof, see http://golang.org/pkg/net/http/pprof/
## Config
============