Documentation ¶
Index ¶
- Constants
- Variables
- func AccessManaMap() mana.NodeMap
- func AccessPercentile() float64
- func AccessResearchManaMap() mana.NodeMap
- func AccessResearchPercentile() float64
- func ActiveConflicts() uint64
- func AnalysisOutboundBytes() uint64
- func AutopeeringDistanceStats() (min, max uint64, avg float64)
- func AverageNeighborsAccess() float64
- func AverageNeighborsConsensus() float64
- func AveragePledgeAccess() mana.NodeMap
- func AveragePledgeConsensus() mana.NodeMap
- func AverageRoundsToFinalize() float64
- func AvgNeighborConnectionLifeTime() float64
- func AvgSolidificationTime() (result float64)
- func CPUUsage() float64
- func ConsensusManaMap() mana.NodeMap
- func ConsensusPercentile() float64
- func ConsensusResearchManaMap() mana.NodeMap
- func ConsensusResearchPercentile() float64
- func FPCInboundBytes() uint64
- func FPCOpinionQueryReceived() uint64
- func FPCOpinionQueryReplyErrors() uint64
- func FPCOutboundBytes() uint64
- func FPCQueryReceived() uint64
- func FPCQueryReplyErrors() uint64
- func FailedConflicts() uint64
- func FinalizedConflict() uint64
- func GossipInboundBytes() uint64
- func GossipOutboundBytes() uint64
- func MemUsage() uint64
- func MessageCountSinceStartPerComponent() map[ComponentType]uint64
- func MessageCountSinceStartPerPayload() map[payload.Type]uint64
- func MessageMissingCountDB() uint64
- func MessageRequestQueueSize() int64
- func MessageSolidCountDB() uint64
- func MessageTips() uint64
- func MessageTotalCountDB() uint64
- func MessageTotalCountSinceStart() uint64
- func NeighborConnectionsCount() uint64
- func NeighborDropCount() uint64
- func NetworkDiameter() int32
- func NodesMetrics() map[string]NodeInfo
- func OwnAccessResearchMana() float64
- func OwnConsensusMana() float64
- func OwnConsensusResearchMana() float64
- func Plugin() *node.Plugin
- func ReceivedMessagesPerSecond() uint64
- func Synced() bool
- type ComponentType
- type NodeInfo
- type NodePledgeMap
- type PledgeLog
Constants ¶
const ( // CfgMetricsLocal defines the config flag to enable/disable local metrics. CfgMetricsLocal = "metrics.local" // CfgMetricsGlobal defines the config flag to enable/disable global metrics. CfgMetricsGlobal = "metrics.global" // CfgManaUpdateInterval defines the interval in seconds at which mana metrics are updated. CfgManaUpdateInterval = "metrics.manaUpdateInterval" // CfgMetricsManaResearch defines mana metrics for research. CfgMetricsManaResearch = "metrics.manaResearch" )
const PluginName = "Metrics"
PluginName is the name of the metrics plugin.
Variables ¶
var Events = pluginEvents{ ReceivedMPSUpdated: events.NewEvent(uint64EventCaller), ReceivedTPSUpdated: events.NewEvent(uint64EventCaller), }
Events defines the events of the plugin.
Functions ¶
func AccessManaMap ¶ added in v0.5.0
AccessManaMap returns the access mana of the whole network.
func AccessPercentile ¶ added in v0.5.0
func AccessPercentile() float64
AccessPercentile returns the top percentile the node belongs to in terms of access mana holders.
func AccessResearchManaMap ¶ added in v0.5.0
AccessResearchManaMap returns the access mana of the whole network, only taking ResearchAccess mana into account.
func AccessResearchPercentile ¶ added in v0.5.0
func AccessResearchPercentile() float64
AccessResearchPercentile returns the top percentile the node belongs to in terms of access mana holders, only taking ResearchAccess mana into account.
func ActiveConflicts ¶ added in v0.2.0
func ActiveConflicts() uint64
ActiveConflicts returns the number of currently active conflicts.
func AnalysisOutboundBytes ¶ added in v0.2.0
func AnalysisOutboundBytes() uint64
AnalysisOutboundBytes returns the total outbound analysis traffic.
func AutopeeringDistanceStats ¶ added in v0.2.0
AutopeeringDistanceStats returns statistics of the autopeering distance function.
func AverageNeighborsAccess ¶ added in v0.5.0
func AverageNeighborsAccess() float64
AverageNeighborsAccess returns the average access mana of the nodes neighbors.
func AverageNeighborsConsensus ¶ added in v0.5.0
func AverageNeighborsConsensus() float64
AverageNeighborsConsensus returns the average consensus mana of the nodes neighbors.
func AveragePledgeAccess ¶ added in v0.5.0
AveragePledgeAccess returns the average pledged access base mana of all nodes.
func AveragePledgeConsensus ¶ added in v0.5.0
AveragePledgeConsensus returns the average pledged consensus base mana of all nodes.
func AverageRoundsToFinalize ¶ added in v0.2.0
func AverageRoundsToFinalize() float64
AverageRoundsToFinalize returns the average number of rounds it takes to finalize conflicts since the start of the node.
func AvgNeighborConnectionLifeTime ¶ added in v0.2.0
func AvgNeighborConnectionLifeTime() float64
AvgNeighborConnectionLifeTime return the average neighbor connection lifetime.
func AvgSolidificationTime ¶ added in v0.2.2
func AvgSolidificationTime() (result float64)
AvgSolidificationTime returns the average time it takes for a message to become solid. [milliseconds]
func ConsensusManaMap ¶ added in v0.5.0
ConsensusManaMap returns the consensus mana of the whole network.
func ConsensusPercentile ¶ added in v0.5.0
func ConsensusPercentile() float64
ConsensusPercentile returns the top percentile the node belongs to in terms of consensus mana holders.
func ConsensusResearchManaMap ¶ added in v0.5.0
ConsensusResearchManaMap returns the consensus mana of the whole network, only taking ResearchConsensus mana into account.
func ConsensusResearchPercentile ¶ added in v0.5.0
func ConsensusResearchPercentile() float64
ConsensusResearchPercentile returns the top percentile the node belongs to in terms of consensus mana holders, only taking ResearchConsensus mana into account.
func FPCInboundBytes ¶ added in v0.2.0
func FPCInboundBytes() uint64
FPCInboundBytes returns the total inbound FPC traffic.
func FPCOpinionQueryReceived ¶ added in v0.2.0
func FPCOpinionQueryReceived() uint64
FPCOpinionQueryReceived returns the number of received opinion queries.
func FPCOpinionQueryReplyErrors ¶ added in v0.2.0
func FPCOpinionQueryReplyErrors() uint64
FPCOpinionQueryReplyErrors returns the number of opinions that the node failed to gather from peers.
func FPCOutboundBytes ¶ added in v0.2.0
func FPCOutboundBytes() uint64
FPCOutboundBytes returns the total outbound FPC traffic.
func FPCQueryReceived ¶ added in v0.2.0
func FPCQueryReceived() uint64
FPCQueryReceived returns the number of received voting queries. For an exact number of opinion queries, use FPCOpinionQueryReceived().
func FPCQueryReplyErrors ¶ added in v0.2.0
func FPCQueryReplyErrors() uint64
FPCQueryReplyErrors returns the number of sent but unanswered queries for conflict opinions. For an exact number of failed opinions, use FPCOpinionQueryReplyErrors().
func FailedConflicts ¶ added in v0.2.0
func FailedConflicts() uint64
FailedConflicts returns the number of failed conflicts since the start of the node.
func FinalizedConflict ¶ added in v0.2.0
func FinalizedConflict() uint64
FinalizedConflict returns the number of finalized conflicts since the start of the node.
func GossipInboundBytes ¶ added in v0.2.0
func GossipInboundBytes() uint64
GossipInboundBytes returns the total inbound gossip traffic.
func GossipOutboundBytes ¶ added in v0.2.0
func GossipOutboundBytes() uint64
GossipOutboundBytes returns the total outbound gossip traffic.
func MemUsage ¶ added in v0.2.0
func MemUsage() uint64
MemUsage returns the current memory allocated as bytes.
func MessageCountSinceStartPerComponent ¶ added in v0.4.0
func MessageCountSinceStartPerComponent() map[ComponentType]uint64
MessageCountSinceStartPerComponent returns a map of message count per component types and their count since the start of the node.
func MessageCountSinceStartPerPayload ¶ added in v0.2.2
MessageCountSinceStartPerPayload returns a map of message payload types and their count since the start of the node.
func MessageMissingCountDB ¶ added in v0.2.2
func MessageMissingCountDB() uint64
MessageMissingCountDB returns the number of messages in missingMessageStore.
func MessageRequestQueueSize ¶ added in v0.2.2
func MessageRequestQueueSize() int64
MessageRequestQueueSize returns the number of message requests the node currently has registered.
func MessageSolidCountDB ¶ added in v0.2.2
func MessageSolidCountDB() uint64
MessageSolidCountDB returns the number of messages that are solid in the DB.
func MessageTips ¶ added in v0.2.0
func MessageTips() uint64
MessageTips returns the actual number of tips in the message tangle.
func MessageTotalCountDB ¶ added in v0.2.2
func MessageTotalCountDB() uint64
MessageTotalCountDB returns the number of messages that are stored in the DB.
func MessageTotalCountSinceStart ¶ added in v0.2.2
func MessageTotalCountSinceStart() uint64
MessageTotalCountSinceStart returns the total number of messages seen since the start of the node.
func NeighborConnectionsCount ¶ added in v0.2.0
func NeighborConnectionsCount() uint64
NeighborConnectionsCount returns the neighbors connections count.
func NeighborDropCount ¶ added in v0.2.0
func NeighborDropCount() uint64
NeighborDropCount returns the neighbor drop count.
func NetworkDiameter ¶ added in v0.2.0
func NetworkDiameter() int32
NetworkDiameter returns the current network diameter.
func NodesMetrics ¶ added in v0.2.0
NodesMetrics returns info about the OS, arch, number of cpu cores, cpu load and memory usage.
func OwnAccessResearchMana ¶ added in v0.5.0
func OwnAccessResearchMana() float64
OwnAccessResearchMana returns the access mana of the node, only taking ResearchAccess mana into account.
func OwnConsensusMana ¶ added in v0.5.0
func OwnConsensusMana() float64
OwnConsensusMana returns the consensus mana of the node.
func OwnConsensusResearchMana ¶ added in v0.5.0
func OwnConsensusResearchMana() float64
OwnConsensusResearchMana returns the consensus mana of the node, only taking ResearchConsensus mana into account.
func ReceivedMessagesPerSecond ¶ added in v0.2.0
func ReceivedMessagesPerSecond() uint64
ReceivedMessagesPerSecond retrieves the current messages per second number.
Types ¶
type ComponentType ¶ added in v0.4.0
type ComponentType byte
ComponentType defines the component for the different MPS metrics.
const ( // Store denotes messages stored by the message store. Store ComponentType = iota // Solidifier denotes messages solidified by the solidifier. Solidifier // Scheduler denotes messages scheduled by the scheduler. Scheduler // Booker denotes messages booked by the booker. Booker )
func (ComponentType) String ¶ added in v0.4.0
func (c ComponentType) String() string
String returns the stringified component type.
type NodeInfo ¶ added in v0.2.0
type NodeInfo struct { OS string // Arch defines the system architecture of the node. Arch string // NumCPU defines number of logical cores of the node. NumCPU int // CPUUsage defines the CPU usage of the node. CPUUsage float64 // MemoryUsage defines the memory usage of the node. MemoryUsage uint64 }
NodeInfo holds info of a node.
type NodePledgeMap ¶ added in v0.5.0
NodePledgeMap is a map of node and a list of mana pledges.
type PledgeLog ¶ added in v0.5.0
PledgeLog is a log of base mana 1 and 2 pledges.
func (*PledgeLog) AddAccess ¶ added in v0.5.0
AddAccess logs the value of access pledge (base mana 2) pledged.
func (*PledgeLog) AddConsensus ¶ added in v0.5.0
AddConsensus logs the value of consensus pledge (base mana 1) pledged.
func (*PledgeLog) GetAccessAverage ¶ added in v0.5.0
GetAccessAverage returns the average access mana pledge of a node.
func (*PledgeLog) GetConsensusAverage ¶ added in v0.5.0
GetConsensusAverage returns the consensus mana pledged.