add pprof
This commit is contained in:
parent
51a888e470
commit
1a52c80dd9
@ -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)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user