Skip to content

Commit d9503e0

Browse files
authored
fix: mem profiling (#368)
* fix: mem profiling * fix: minor fixes
1 parent 2c4e50a commit d9503e0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ func init() {
212212
}
213213

214214
func main() {
215-
// add cpu profilling
215+
// add cpu profiling
216216
if cpuprofile {
217-
defer profile.Start(profile.NoShutdownHook).Stop()
217+
defer profile.Start(profile.CPUProfile, profile.NoShutdownHook).Stop()
218218
}
219-
// add mem profilling
219+
// add mem profiling
220220
if memprofile {
221-
defer profile.Start(profile.MemProfile).Stop()
221+
defer profile.Start(profile.MemProfile, profile.NoShutdownHook).Stop()
222222
}
223223

224224
log.SetReportCaller(true)

0 commit comments

Comments
 (0)