Преглед изворни кода

Include heap pprof in diagnosis report to help debugging memory leaks (#28596) (#28599)

tags/v1.21.4
Giteabot пре 5 месеци
родитељ
комит
f2add36a29
No account linked to committer's email address
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7
    0
      routers/web/admin/diagnosis.go

+ 7
- 0
routers/web/admin/diagnosis.go Прегледај датотеку

@@ -58,4 +58,11 @@ func MonitorDiagnosis(ctx *context.Context) {
return
}
_ = pprof.Lookup("goroutine").WriteTo(f, 1)

f, err = zipWriter.CreateHeader(&zip.FileHeader{Name: "heap.dat", Method: zip.Deflate, Modified: time.Now()})
if err != nil {
ctx.ServerError("Failed to create zip file", err)
return
}
_ = pprof.Lookup("heap").WriteTo(f, 0)
}

Loading…
Откажи
Сачувај