mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 13:21:20 +00:00
Added pprof entry
This commit is contained in:
11
node/node.go
11
node/node.go
@ -1,6 +1,7 @@
|
|||||||
package node
|
package node
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -21,6 +22,14 @@ import (
|
|||||||
"github.com/tendermint/tendermint/types"
|
"github.com/tendermint/tendermint/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
import _ "net/http/pprof"
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
go func() {
|
||||||
|
fmt.Println(http.ListenAndServe("0.0.0.0:6060", nil))
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
type Node struct {
|
type Node struct {
|
||||||
sw *p2p.Switch
|
sw *p2p.Switch
|
||||||
evsw *events.EventSwitch
|
evsw *events.EventSwitch
|
||||||
@ -209,7 +218,7 @@ func makeNodeInfo(sw *p2p.Switch) *types.NodeInfo {
|
|||||||
nodeInfo := &types.NodeInfo{
|
nodeInfo := &types.NodeInfo{
|
||||||
Moniker: config.App().GetString("Moniker"),
|
Moniker: config.App().GetString("Moniker"),
|
||||||
Network: config.App().GetString("Network"),
|
Network: config.App().GetString("Network"),
|
||||||
Version: "0.0.1",
|
Version: "0.0.2", // Bumped for new SignBytes.
|
||||||
}
|
}
|
||||||
if !sw.IsListening() {
|
if !sw.IsListening() {
|
||||||
return nodeInfo
|
return nodeInfo
|
||||||
|
Reference in New Issue
Block a user