From d19050060ad1a3d13a7f79339bad3f882f3d99c4 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Fri, 25 Aug 2023 23:28:06 +0100 Subject: [PATCH] Add pprof logging --- cmd/violet/serve.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/violet/serve.go b/cmd/violet/serve.go index 53b4adf..bd2cc49 100644 --- a/cmd/violet/serve.go +++ b/cmd/violet/serve.go @@ -22,6 +22,7 @@ import ( "io/fs" "log" "net/http" + _ "net/http/pprof" "os" "path/filepath" ) @@ -156,6 +157,10 @@ func normalLoad(startUp startUpConfig, wd string) { go utils.RunBackgroundHttps("HTTPS", srvHttps) } + go func() { + log.Println(http.ListenAndServe("localhost:6600", nil)) + }() + exit_reload.ExitReload("Violet", func() { allCompilables.Compile() }, func() {