|
@@ -2,7 +2,6 @@ package main
|
|
|
|
|
|
import (
|
|
import (
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
- "net/http"
|
|
|
|
_ "net/http/pprof"
|
|
_ "net/http/pprof"
|
|
"sparrow/pkg/rpcs"
|
|
"sparrow/pkg/rpcs"
|
|
"sparrow/pkg/server"
|
|
"sparrow/pkg/server"
|
|
@@ -13,13 +12,13 @@ var deviceMessageCount *prometheus.CounterVec
|
|
|
|
|
|
func main() {
|
|
func main() {
|
|
|
|
|
|
- go func() {
|
|
|
|
- pprofPort := "6060"
|
|
|
|
- server.Log.Infof("pprof server started at :%s/debug/pprof", pprofPort)
|
|
|
|
- if err := http.ListenAndServe(":"+pprofPort, nil); err != nil {
|
|
|
|
- server.Log.Errorf("pprof server failed: %v", err)
|
|
|
|
- }
|
|
|
|
- }()
|
|
|
|
|
|
+ //go func() {
|
|
|
|
+ // pprofPort := "6060"
|
|
|
|
+ // server.Log.Infof("pprof server started at :%s/debug/pprof", pprofPort)
|
|
|
|
+ // if err := http.ListenAndServe(":"+pprofPort, nil); err != nil {
|
|
|
|
+ // server.Log.Errorf("pprof server failed: %v", err)
|
|
|
|
+ // }
|
|
|
|
+ //}()
|
|
|
|
|
|
// init server
|
|
// init server
|
|
err := server.Init(rpcs.MQTTAccessName)
|
|
err := server.Init(rpcs.MQTTAccessName)
|