Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogError ¶ added in v0.4.0
LogError logs a single error it uses LogPublishErrors in the background.
func LogPublishErrors ¶ added in v0.4.0
LogPublishErrors will log errors for a message. This method is mostly used for debug messages from rpcBus.Publish return errList.
func RegisterWireMsg ¶ added in v0.4.0
RegisterWireMsg is a util for registering a wire message to a network-monitor. service in a zero-overhead manner. Under the hood, it encodes a json-rpc with following fields msg_id, node_address (or node id), receive timestamp in, networkType is the type of the network (Kadcst, Gossip are allowed valued), rawdata is the wire message data.
Types ¶
type NoteRequest ¶ added in v0.4.0
type NoteRequest struct { Method string `json:"method"` Params []NoteArgs `json:"params"` ID string `json:"id"` }
NoteRequest rpc request.
func (*NoteRequest) Say ¶ added in v0.4.0
func (h *NoteRequest) Say(p NoteArgs) *NoteRequest
Say rpc method.
type Profile ¶
type Profile struct {
// contains filtered or unexported fields
}
Profile represents the cpu or memory profile sampled at regular intervals.
type ProfileSet ¶
type ProfileSet struct {
// contains filtered or unexported fields
}
ProfileSet allows fetching program samples of different types. It could be handful if node user observes problematic situation or any type of inefficiency. In most cases, it will allow a developer to catch a perf issue (Memory, CPU or concurrency inefficiency) at development phase. As support for periodical sample fetching is added, the tool could enable 'continuous profiling' with negligible overhead.
See also func profile.loop() for a few examples of use.
func NewProfileSet ¶
func NewProfileSet() ProfileSet
NewProfileSet creates and starts ProfileSet from a set of settings strings.
func (*ProfileSet) Listen ¶
func (ps *ProfileSet) Listen(rpc *rpcbus.RPCBus)
Listen listens rpcbus commands to allow enabling/disabling any profile in runtime (e.g via rpc).
func (*ProfileSet) Spawn ¶
func (ps *ProfileSet) Spawn(p Profile) error
Spawn a ProfileSet from a Profile.