mirror of
https://github.com/itzg/mc-router.git
synced 2024-11-21 11:25:41 +01:00
Close cpu profile file at exit
This commit is contained in:
parent
19c9f1550d
commit
b6edd937ea
@ -48,6 +48,7 @@ func main() {
|
||||
if err != nil {
|
||||
logrus.WithError(err).Fatal("trying to create cpu profile file")
|
||||
}
|
||||
defer cpuProfileFile.Close()
|
||||
|
||||
logrus.WithField("file", *cpuProfileFile).Info("Starting cpu profiling")
|
||||
err = pprof.StartCPUProfile(cpuProfileFile)
|
||||
|
Loading…
Reference in New Issue
Block a user