collect proof when stopping

This commit is contained in:
Chris Lu committed 2016-07-05 10:23:14 -07:00
1 parent b38ff39e8b
commit d3ae3a8e14
1 file changed
+3
+3
View File
@@ -60,6 +60,9 @@ func runMaster(cmd *Command, args []string) bool {
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
OnInterrupt(func() {
pprof.StopCPUProfile()
})
}
if err := util.TestFolderWritable(*metaFolder); err != nil {
glog.Fatalf("Check Meta Folder (-mdir) Writable %s : %s", *metaFolder, err)