collect proof when stopping

This commit is contained in:
Chris Lu 2016-07-05 10:23:14 -07:00
parent b38ff39e8b
commit d3ae3a8e14

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)