feat: add pprof server

This commit is contained in:
lynx
2024-09-10 18:31:56 +08:00
parent 74f45981e6
commit 7ca697a864

View File

@@ -4,6 +4,8 @@ import (
"context"
"flag"
"log"
"net/http"
_ "net/http/pprof"
"github.com/wlynxg/NetHive/core/config"
"github.com/wlynxg/NetHive/core/engine"
@@ -23,6 +25,10 @@ func parse() *args {
func main() {
params := parse()
go func() {
http.ListenAndServe(":6060", nil)
}()
cfg, err := config.Load(params.config)
if err != nil {
log.Fatal(err)