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
cad3da33
authored
2014-08-15 15:17:11 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
toolbox: fix the program name
1 parent
3969cd3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
toolbox/profile.go
toolbox/profile.go
View file @
cad3da3
...
...
@@ -15,6 +15,7 @@ import (
"log"
"net/http"
"os"
"path"
"runtime"
"runtime/debug"
"runtime/pprof"
...
...
@@ -64,7 +65,8 @@ func MemProf(w io.Writer) {
pprof
.
WriteHeapProfile
(
f
)
f
.
Close
()
fmt
.
Fprintf
(
w
,
"create heap profile %s
\n
"
,
filename
)
fmt
.
Fprintf
(
w
,
"Now you can use this to check it: go tool pprof <program> %s
\n
"
,
filename
)
_
,
fl
:=
path
.
Split
(
os
.
Args
[
0
])
fmt
.
Fprintf
(
w
,
"Now you can use this to check it: go tool pprof %s %s
\n
"
,
fl
,
filename
)
}
}
...
...
@@ -85,7 +87,8 @@ func GetCPUProfile(rw http.ResponseWriter) {
time
.
Sleep
(
time
.
Duration
(
sec
)
*
time
.
Second
)
pprof
.
StopCPUProfile
()
fmt
.
Fprintf
(
rw
,
"create cpu profile %s
\n
"
,
filename
)
fmt
.
Fprintf
(
rw
,
"Now you can use this to check it: go tool pprof <program> %s
\n
"
,
filename
)
_
,
fl
:=
path
.
Split
(
os
.
Args
[
0
])
fmt
.
Fprintf
(
rw
,
"Now you can use this to check it: go tool pprof %s %s
\n
"
,
fl
,
filename
)
}
// print gc information to io.Writer
...
...
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