remove pprop

pull/988/head
withchao 2 years ago
parent 4485d425cb
commit 731d241a12

@ -18,9 +18,6 @@ import (
"context" "context"
"fmt" "fmt"
"net" "net"
"net/http"
"os"
"runtime"
"strconv" "strconv"
"time" "time"
@ -46,16 +43,6 @@ func main() {
} }
} }
func startPprof() {
runtime.GOMAXPROCS(1)
runtime.SetMutexProfileFraction(1)
runtime.SetBlockProfileRate(1)
if err := http.ListenAndServe(":6060", nil); err != nil {
panic(err)
}
os.Exit(0)
}
func run(port int) error { func run(port int) error {
if port == 0 { if port == 0 {
return fmt.Errorf("port is empty") return fmt.Errorf("port is empty")
@ -92,7 +79,6 @@ func run(port int) error {
} }
fmt.Println("start api server, address: ", address, ", OpenIM version: ", config.Version) fmt.Println("start api server, address: ", address, ", OpenIM version: ", config.Version)
log.ZInfo(context.Background(), "start server success", "address", address, "version", config.Version) log.ZInfo(context.Background(), "start server success", "address", address, "version", config.Version)
go startPprof()
err = router.Run(address) err = router.Run(address)
if err != nil { if err != nil {
log.ZError(context.Background(), "api run failed ", err, "address", address) log.ZError(context.Background(), "api run failed ", err, "address", address)

Loading…
Cancel
Save