mirror of
https://github.com/itzg/mc-router.git
synced 2024-06-28 10:54:50 +02: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 {
|
if err != nil {
|
||||||
logrus.WithError(err).Fatal("trying to create cpu profile file")
|
logrus.WithError(err).Fatal("trying to create cpu profile file")
|
||||||
}
|
}
|
||||||
|
defer cpuProfileFile.Close()
|
||||||
|
|
||||||
logrus.WithField("file", *cpuProfileFile).Info("Starting cpu profiling")
|
logrus.WithField("file", *cpuProfileFile).Info("Starting cpu profiling")
|
||||||
err = pprof.StartCPUProfile(cpuProfileFile)
|
err = pprof.StartCPUProfile(cpuProfileFile)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user