|
|
@@ -17,7 +17,8 @@ func init() {
|
|
|
pprofpath := config.GetString("pprof")
|
|
|
if pprofpath != "" {
|
|
|
go func() {
|
|
|
- for {
|
|
|
+ t := time.NewTicker(1 * time.Minute)
|
|
|
+ for range t.C {
|
|
|
selfmonitor.MemoryInfoCapture(pprofpath, 1*time.Minute)
|
|
|
(&mio.ClearFiles{Dir: pprofpath, NameMatch: `^.*\.prof$`, KeepLast: 10}).Do()
|
|
|
}
|