From b4983a52de93740eb4e66d66d59d02a4a88bbd94 Mon Sep 17 00:00:00 2001 From: Akmal Date: Mon, 15 Jul 2024 10:46:21 +0700 Subject: [PATCH] pprof --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index d2ce3a4..ee28515 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( "instafix/utils" "instafix/views" "net/http" + _ "net/http/pprof" "os" "strconv" "strings" @@ -57,6 +58,11 @@ func main() { } }() + go func() { + log.Info().Msg("Starting pprof server") + http.ListenAndServe("0.0.0.0:6060", nil) + }() + // Close database when app closes // defer scraper.DB.Close()