Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
3e3abb7b
authored
2012-12-27 22:42:16 +0800
by
xiemengjun
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add support goroutine pprof
1 parent
c967f2d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
beego.go
pprof.go
beego.go
View file @
3e3abb7
...
...
@@ -156,7 +156,7 @@ func FilterPrefixPath(path string, filter http.HandlerFunc) *App {
func
Run
()
{
if
PprofOn
{
BeeApp
.
RegisterController
(
`/debug/pprof`
,
&
ProfController
{})
BeeApp
.
RegisterController
(
`/debug/pprof/:pp([\w
+]
)`
,
&
ProfController
{})
BeeApp
.
RegisterController
(
`/debug/pprof/:pp([\w
]+
)`
,
&
ProfController
{})
}
BeeApp
.
Run
()
}
...
...
pprof.go
View file @
3e3abb7
...
...
@@ -18,5 +18,8 @@ func (this *ProfController) Get() {
pprof
.
Profile
(
this
.
Ctx
.
ResponseWriter
,
this
.
Ctx
.
Request
)
}
else
if
ptype
==
"symbol"
{
pprof
.
Symbol
(
this
.
Ctx
.
ResponseWriter
,
this
.
Ctx
.
Request
)
}
else
{
pprof
.
Index
(
this
.
Ctx
.
ResponseWriter
,
this
.
Ctx
.
Request
)
}
this
.
Ctx
.
ResponseWriter
.
WriteHeader
(
200
)
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment