Skip to content

Commit

Permalink
Merge branch 'main' into alpine319
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot authored Dec 23, 2023
2 parents 18750dd + 330aab4 commit 6ac8e54
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions routers/web/admin/diagnosis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 6ac8e54

Please sign in to comment.