fix(TestProfilingMem)_: enable run with -count=2
This commit is contained in:
parent
2a5e0c3f71
commit
5dca5c1354
|
@ -21,8 +21,12 @@ func WriteHeapFile(dataDir string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer memFile.Close() //nolint: errcheck
|
||||
defer func() {
|
||||
memFile.Close() //nolint: errcheck
|
||||
memFile = nil
|
||||
}()
|
||||
}
|
||||
|
||||
runtime.GC()
|
||||
err = pprof.WriteHeapProfile(memFile)
|
||||
|
||||
|
|
Loading…
Reference in New Issue