Skip to content
Snippets Groups Projects
Commit 64270296 authored by fangyincheng's avatar fangyincheng
Browse files

Rem:delete pprof

parent 9eb0e81d
No related branches found
No related tags found
No related merge requests found
Showing
with 1 addition and 185 deletions
......@@ -142,10 +142,6 @@ func providerInit(confProFile string) error {
/////////////////////////
type ConsumerConfig struct {
// pprof
Pprof_Enabled bool `default:"false" yaml:"pprof_enabled" json:"pprof_enabled,omitempty"`
Pprof_Port int `default:"10086" yaml:"pprof_port" json:"pprof_port,omitempty"`
Filter string `yaml:"filter" json:"filter,omitempty"`
// client
......@@ -185,10 +181,6 @@ func GetConsumerConfig() ConsumerConfig {
/////////////////////////
type ProviderConfig struct {
// pprof
Pprof_Enabled bool `default:"false" yaml:"pprof_enabled" json:"pprof_enabled,omitempty"`
Pprof_Port int `default:"10086" yaml:"pprof_port" json:"pprof_port,omitempty"`
Filter string `yaml:"filter" json:"filter,omitempty"`
ProxyFactory string `yaml:"proxy_factory" default:"default" json:"proxy_factory,omitempty"`
......
# dubbo client yaml configure file
# pprof
pprof_enabled : true
pprof_port : 10086
filter: ""
# client
......
# dubbo server yaml configure file
# pprof
pprof_enabled : true
pprof_port : 20080
filter: ""
# application config
application_config:
......
......@@ -17,11 +17,8 @@ package main
import (
"context"
"fmt"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"strconv"
"syscall"
"time"
)
......@@ -33,7 +30,6 @@ import (
import (
_ "github.com/dubbo/go-for-apache-dubbo/common/proxy/proxy_factory"
"github.com/dubbo/go-for-apache-dubbo/common/utils"
"github.com/dubbo/go-for-apache-dubbo/config"
_ "github.com/dubbo/go-for-apache-dubbo/protocol/dubbo"
_ "github.com/dubbo/go-for-apache-dubbo/registry/protocol"
......@@ -63,8 +59,6 @@ func main() {
panic("conMap is nil")
}
initProfiling()
println("\n\n\necho")
res, err := conMap["com.ikurento.user.UserProvider"].GetRPCService().(*UserProvider).Echo(context.TODO(), "OK")
if err != nil {
......@@ -107,31 +101,6 @@ func main() {
initSignal()
}
func initProfiling() {
if !config.GetConsumerConfig().Pprof_Enabled {
return
}
const (
PprofPath = "/debug/pprof/"
)
var (
err error
ip string
addr string
)
ip, err = utils.GetLocalIP()
if err != nil {
panic("cat not get local ip!")
}
addr = ip + ":" + strconv.Itoa(config.GetConsumerConfig().Pprof_Port)
log.Info("App Profiling startup on address{%v}", addr+PprofPath)
go func() {
log.Info(http.ListenAndServe(addr, nil))
}()
}
func initSignal() {
signals := make(chan os.Signal, 1)
// It is not possible to block SIGKILL or syscall.SIGSTOP
......
# dubbo client yaml configure file
# pprof
pprof_enabled : true
pprof_port : 10086
# client
request_timeout : "100ms"
# connect timeout
......
# dubbo client yaml configure file
# pprof
pprof_enabled : true
pprof_port : 10086
# client
request_timeout : "100ms"
# connect timeout
......
# dubbo client yaml configure file
# pprof
pprof_enabled : true
pprof_port : 10086
# client
request_timeout : "100ms"
# connect timeout
......
......@@ -16,11 +16,8 @@ package main
import (
"fmt"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"strconv"
"syscall"
"time"
)
......@@ -31,7 +28,6 @@ import (
)
import (
"github.com/dubbo/go-for-apache-dubbo/common/utils"
"github.com/dubbo/go-for-apache-dubbo/config"
_ "github.com/dubbo/go-for-apache-dubbo/protocol/dubbo"
_ "github.com/dubbo/go-for-apache-dubbo/registry/protocol"
......@@ -64,36 +60,9 @@ func main() {
panic("proMap is nil")
}
initProfiling()
initSignal()
}
func initProfiling() {
if !config.GetProviderConfig().Pprof_Enabled {
return
}
const (
PprofPath = "/debug/pprof/"
)
var (
err error
ip string
addr string
)
ip, err = utils.GetLocalIP()
if err != nil {
panic("can not get local ip!")
}
addr = ip + ":" + strconv.Itoa(config.GetProviderConfig().Pprof_Port)
log.Info("App Profiling startup on address{%v}", addr+PprofPath)
go func() {
log.Info(http.ListenAndServe(addr, nil))
}()
}
func initSignal() {
signals := make(chan os.Signal, 1)
// It is not possible to block SIGKILL or syscall.SIGSTOP
......
# dubbo server yaml configure file
# pprof
pprof_enabled : true
pprof_port : 20080
# application config
application_config:
organization : "ikurento.com"
......
# dubbo server yaml configure file
# pprof
pprof_enabled : true
pprof_port : 20080
# application config
application_config:
organization : "ikurento.com"
......
# dubbo server yaml configure file
# pprof
pprof_enabled : true
pprof_port : 20080
# application config
application_config:
organization : "ikurento.com"
......
......@@ -17,11 +17,8 @@ package main
import (
"context"
"fmt"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"strconv"
"syscall"
"time"
)
......@@ -32,7 +29,6 @@ import (
import (
_ "github.com/dubbo/go-for-apache-dubbo/common/proxy/proxy_factory"
"github.com/dubbo/go-for-apache-dubbo/common/utils"
"github.com/dubbo/go-for-apache-dubbo/config"
_ "github.com/dubbo/go-for-apache-dubbo/protocol/jsonrpc"
_ "github.com/dubbo/go-for-apache-dubbo/registry/protocol"
......@@ -58,8 +54,6 @@ func main() {
panic("conMap is nil")
}
initProfiling()
println("\n\n\necho")
res, err := conMap["com.ikurento.user.UserProvider"].GetRPCService().(*UserProvider).Echo(context.TODO(), "OK")
if err != nil {
......@@ -103,31 +97,6 @@ func main() {
initSignal()
}
func initProfiling() {
if !config.GetConsumerConfig().Pprof_Enabled {
return
}
const (
PprofPath = "/debug/pprof/"
)
var (
err error
ip string
addr string
)
ip, err = utils.GetLocalIP()
if err != nil {
panic("cat not get local ip!")
}
addr = ip + ":" + strconv.Itoa(config.GetConsumerConfig().Pprof_Port)
log.Info("App Profiling startup on address{%v}", addr+PprofPath)
go func() {
log.Info(http.ListenAndServe(addr, nil))
}()
}
func initSignal() {
signals := make(chan os.Signal, 1)
// It is not possible to block SIGKILL or syscall.SIGSTOP
......
# dubbo client yaml configure file
# pprof
pprof_enabled : true
pprof_port : 10086
check: true
# client
request_timeout : "3s"
......
# dubbo client yaml configure file
# pprof
pprof_enabled : true
pprof_port : 10086
check: true
# client
request_timeout : "3s"
......
# dubbo client yaml configure file
# pprof
pprof_enabled : true
pprof_port : 10086
check: true
# client
request_timeout : "3s"
......
......@@ -16,11 +16,8 @@ package main
import (
"fmt"
"net/http"
_ "net/http/pprof"
"os"
"os/signal"
"strconv"
"syscall"
"time"
)
......@@ -31,7 +28,6 @@ import (
import (
_ "github.com/dubbo/go-for-apache-dubbo/common/proxy/proxy_factory"
"github.com/dubbo/go-for-apache-dubbo/common/utils"
"github.com/dubbo/go-for-apache-dubbo/config"
_ "github.com/dubbo/go-for-apache-dubbo/protocol/jsonrpc"
_ "github.com/dubbo/go-for-apache-dubbo/registry/protocol"
......@@ -57,36 +53,9 @@ func main() {
panic("proMap is nil")
}
initProfiling()
initSignal()
}
func initProfiling() {
if !config.GetProviderConfig().Pprof_Enabled {
return
}
const (
PprofPath = "/debug/pprof/"
)
var (
err error
ip string
addr string
)
ip, err = utils.GetLocalIP()
if err != nil {
panic("cat not get local ip!")
}
addr = ip + ":" + strconv.Itoa(config.GetProviderConfig().Pprof_Port)
log.Info("App Profiling startup on address{%v}", addr+PprofPath)
go func() {
log.Info(http.ListenAndServe(addr, nil))
}()
}
func initSignal() {
signals := make(chan os.Signal, 1)
// It is not possible to block SIGKILL or syscall.SIGSTOP
......
# dubbo server yaml configure file
# pprof
pprof_enabled : true
pprof_port : 20080
# application config
application_config:
organization : "ikurento.com"
......
# dubbo server yaml configure file
# pprof
pprof_enabled : true
pprof_port : 20080
# application config
application_config:
organization : "ikurento.com"
......
# dubbo server yaml configure file
# pprof
pprof_enabled : true
pprof_port : 20080
# application config
application_config:
organization : "ikurento.com"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment