This commit is contained in:
astaxie
2014-04-11 16:08:43 +08:00
parent 1ea449aa3a
commit 8bcf03c652
24 changed files with 10 additions and 47 deletions

View File

@@ -48,7 +48,7 @@ func ProcessInput(input string, w io.Writer) {
// record memory profile in pprof
func MemProf() {
if f, err := os.Create("mem-" + strconv.Itoa(pid) + ".memprof"); err != nil {
log.Fatal("record memory profile failed: %v", err)
log.Fatal("record memory profile failed: ", err)
} else {
runtime.GC()
pprof.WriteHeapProfile(f)