diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-12-31 14:54:13 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-12-31 14:54:13 -0800 |
| commit | 81904ad3364685d016a7fc1d0335702f1c1cb169 (patch) | |
| tree | bc6e0db9ca6ad863fd1fcbfe671319804ec7c39d | |
| parent | 03cfb4267f3ee19a0c8132447804e8f260148277 (diff) | |
| download | seaweedfs-81904ad3364685d016a7fc1d0335702f1c1cb169.tar.xz seaweedfs-81904ad3364685d016a7fc1d0335702f1c1cb169.zip | |
debugging: track all memory allocations
| -rw-r--r-- | weed/util/pprof.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/util/pprof.go b/weed/util/pprof.go index 363017555..a2621ceee 100644 --- a/weed/util/pprof.go +++ b/weed/util/pprof.go @@ -2,6 +2,7 @@ package util import ( "os" + "runtime" "runtime/pprof" "github.com/chrislusf/seaweedfs/weed/glog" @@ -19,6 +20,7 @@ func SetupProfiling(cpuProfile, memProfile string) { }) } if memProfile != "" { + runtime.MemProfileRate = 1 f, err := os.Create(memProfile) if err != nil { glog.Fatal(err) |
