Skip to content

Commit

Permalink
fix: change prometheus port.
Browse files Browse the repository at this point in the history
  • Loading branch information
FGadvancer committed Dec 6, 2023
1 parent fe3b29f commit d65a078
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions internal/msggateway/n_ws_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"context"
"errors"
"net/http"
"runtime"
"strconv"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -380,14 +379,14 @@ func (ws *WsServer) wsHandler(w http.ResponseWriter, r *http.Request) {
httpError(connContext, errs.ErrConnOverMaxNumLimit)
return
}
maxProcs := runtime.GOMAXPROCS(0)
if maxProcs == runtime.NumCPU() {
log.ZWarn(connContext, "进程没有受到 CPU 核心限制", nil,
"maxProcs", maxProcs, "sysProcs", runtime.NumCPU())
} else {
log.ZWarn(connContext, "进程受到 CPU 核心限制", nil,
"maxProcs", maxProcs, "sysProcs", runtime.NumCPU())
}
//maxProcs := runtime.GOMAXPROCS(0)
//if maxProcs == runtime.NumCPU() {
// log.ZWarn(connContext, "进程没有受到 CPU 核心限制", nil,
// "maxProcs", maxProcs, "sysProcs", runtime.NumCPU())
//} else {
// log.ZWarn(connContext, "进程受到 CPU 核心限制", nil,
// "maxProcs", maxProcs, "sysProcs", runtime.NumCPU())
//}
var (
token string
userID string
Expand Down

0 comments on commit d65a078

Please sign in to comment.