mirror of
https://github.com/wlynxg/NetHive.git
synced 2025-12-24 13:08:30 +08:00
feat: add pprof server
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user