diff --git a/src/main.go b/src/main.go index 648e9da..4f68d0e 100644 --- a/src/main.go +++ b/src/main.go @@ -4,8 +4,6 @@ import ( "fmt" "log" "net/http" - "os" - "strconv" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/cors" @@ -61,18 +59,6 @@ func init() { } func main() { - if v := os.Getenv("PROFILE"); len(v) > 0 { - port, err := strconv.ParseUint(v, 10, 16) - - if err != nil { - panic(err) - } - - go Profile(uint16(port)) - - log.Printf("Profiler is listening on :%d\n", port) - } - defer r.Close() log.Printf("Listening on %s:%d\n", config.Host, config.Port+instanceID) diff --git a/src/profiler.go b/src/profiler.go deleted file mode 100644 index 90af7c7..0000000 --- a/src/profiler.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import ( - "fmt" - "log" - "net/http" - "net/http/pprof" -) - -// Profile is a Goroutine for automatically profiling the program for optimization and debug reasons. -func Profile(port uint16) { - mux := http.NewServeMux() - mux.HandleFunc("/", pprof.Profile) - - log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), mux)) -}