Upgraded MemoryProfiling api + tests

This commit is contained in:
porosnicuadrian
2021-06-30 16:46:52 +03:00
committed by Dan Christian Bogos
parent 2541fd1cd2
commit 78a9b724ed
3 changed files with 68 additions and 9 deletions

View File

@@ -131,6 +131,9 @@ func (cS *CoreService) StartMemoryProfiling(args *utils.MemoryPrf) (err error) {
return utils.NewErrMandatoryIeMissing("Path")
}
cS.shdWg.Add(1)
if cS.stopMemPrf == nil {
cS.stopMemPrf = make(chan struct{})
}
go MemProfiling(args.DirPath, args.Interval, args.NrFiles, cS.shdWg, cS.stopMemPrf, cS.shdChan)
return
}