add pprof

This commit is contained in:
kenneth 2025-04-09 16:16:56 +08:00
parent 51a888e470
commit 1a52c80dd9

View File

@ -4,6 +4,8 @@ import (
"context" "context"
"fmt" "fmt"
"log" "log"
"net/http"
_ "net/http/pprof"
db "management/internal/db/sqlc" db "management/internal/db/sqlc"
"management/internal/erpserver" "management/internal/erpserver"
@ -39,6 +41,10 @@ func init() {
} }
func runErp(ctx context.Context) error { func runErp(ctx context.Context) error {
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()
conf, err := config.New(configPath) conf, err := config.New(configPath)
checkError(err) checkError(err)