添加pprof性能分析

This commit is contained in:
CaIon
2023-11-21 18:11:07 +08:00
parent f18f585fc8
commit 9d191c10a9
4 changed files with 68 additions and 0 deletions

View File

@@ -83,6 +83,12 @@ func main() {
common.SysLog("batch update enabled with interval " + strconv.Itoa(common.BatchUpdateInterval) + "s")
model.InitBatchUpdater()
}
if os.Getenv("ENABLE_PPROF") == "true" {
go common.Monitor()
common.SysLog("pprof enabled")
}
controller.InitTokenEncoders()
// Initialize HTTP server