Documentation ¶
Index ¶
- Constants
- Variables
- func AccessManaMap() mana.NodeMap
- func AccessPercentile() float64
- func AccessResearchManaMap() mana.NodeMap
- func AccessResearchPercentile() float64
- 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 AvgNeighborConnectionLifeTime() float64
- func BlockCountSinceStartPerComponentDashboard() map[ComponentType]uint64
- func BlockCountSinceStartPerComponentGrafana() map[ComponentType]uint64
- func BlockCountSinceStartPerPayload() map[payload.Type]uint64
- func BlockFinalizationTotalTimeSinceIssuedPerType() map[BlockType]uint64
- func BlockFinalizationTotalTimeSinceReceivedPerType() map[BlockType]uint64
- func BlockMissingCountDB() uint64
- func BlockRequestQueueSize() int64
- func BlockTips() uint64
- func CPUUsage() float64
- func ConfirmedConflictCount() uint64
- func ConflictConfirmationTotalTime() uint64
- func ConsensusManaMap() mana.NodeMap
- func ConsensusPercentile() float64
- func ConsensusResearchManaMap() mana.NodeMap
- func ConsensusResearchPercentile() float64
- func FinalizedBlockCountPerType() map[BlockType]uint64
- func FinalizedConflictCountDB() uint64
- func GossipInboundPackets() uint64
- func GossipOutboundPackets() uint64
- func InitialBlockCountPerComponentGrafana() map[ComponentType]uint64
- func InitialBlockMissingCountDB() uint64
- func InitialSchedulerTime() (result int64)
- func InitialSumTimeSinceReceived() map[ComponentType]int64
- func LastCommittedEpoch() *epoch.ECRecord
- func MemUsage() 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 OwnRate() float64
- func ParentCountPerType() map[tangleold.ParentsType]uint64
- func RateSetterBufferSize() int
- func RateSetterEstimate() int64
- func SchedulerBufferSize() int
- func SchedulerDeficit() float64
- func SchedulerMaxBufferSize() int
- func SchedulerNodeAManaAmount() map[string]float64
- func SchedulerNodeQueueSizes() map[string]int
- func SchedulerRate() int64
- func SchedulerReadyBlocksCount() int
- func SchedulerTime() (result int64)
- func SchedulerTotalBufferBlocksCount() int
- func SolidificationRequests() uint64
- func SumTimeSinceIssued() map[ComponentType]int64
- func SumTimeSinceReceived() map[ComponentType]int64
- func TangleTimeSynced() bool
- func TotalConflictCountDB() uint64
- type BlockType
- type ComponentCounterUpdatedEvent
- type ComponentType
- type EventsStruct
- type NodeInfo
- type NodePledgeMap
- type ParametersDefinition
- type PledgeLog
- type RateSetterMetric
- type ReceivedBPSUpdatedEvent
- type ReceivedTPSUpdatedEvent
Constants ¶
const PluginName = "Metrics"
PluginName is the name of the metrics plugin.
Variables ¶
var Parameters = &ParametersDefinition{}
Parameters contains the configuration used by the metrics plugin.
var ( // Plugin is the plugin instance of the metrics plugin. Plugin *node.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 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 AvgNeighborConnectionLifeTime ¶ added in v0.2.0
func AvgNeighborConnectionLifeTime() float64
AvgNeighborConnectionLifeTime return the average neighbor connection lifetime.
func BlockCountSinceStartPerComponentDashboard ¶ added in v0.9.2
func BlockCountSinceStartPerComponentDashboard() map[ComponentType]uint64
BlockCountSinceStartPerComponentDashboard returns a map of block count per component types and their count since last time the value was read.
func BlockCountSinceStartPerComponentGrafana ¶ added in v0.9.2
func BlockCountSinceStartPerComponentGrafana() map[ComponentType]uint64
BlockCountSinceStartPerComponentGrafana returns a map of block count per component types and their count since the start of the node.
func BlockCountSinceStartPerPayload ¶ added in v0.9.2
BlockCountSinceStartPerPayload returns a map of block payload types and their count since the start of the node.
func BlockFinalizationTotalTimeSinceIssuedPerType ¶ added in v0.9.2
BlockFinalizationTotalTimeSinceIssuedPerType returns total time since block issuance it took for all blocks to finalize per block type.
func BlockFinalizationTotalTimeSinceReceivedPerType ¶ added in v0.9.2
BlockFinalizationTotalTimeSinceReceivedPerType returns total time block received it took for all blocks to finalize per block type.
func BlockMissingCountDB ¶ added in v0.9.2
func BlockMissingCountDB() uint64
BlockMissingCountDB returns the number of blocks in missingBlockStore.
func BlockRequestQueueSize ¶ added in v0.9.2
func BlockRequestQueueSize() int64
BlockRequestQueueSize returns the number of block requests the node currently has registered.
func BlockTips ¶ added in v0.9.2
func BlockTips() uint64
BlockTips returns the actual number of tips in the block tangle.
func ConfirmedConflictCount ¶ added in v0.9.2
func ConfirmedConflictCount() uint64
ConfirmedConflictCount returns the number of confirmed conflicts.
func ConflictConfirmationTotalTime ¶ added in v0.9.2
func ConflictConfirmationTotalTime() uint64
ConflictConfirmationTotalTime returns total time it took for all confirmed conflicts to be confirmed.
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 FinalizedBlockCountPerType ¶ added in v0.9.2
FinalizedBlockCountPerType returns the number of blocks finalized per block type.
func FinalizedConflictCountDB ¶ added in v0.9.2
func FinalizedConflictCountDB() uint64
FinalizedConflictCountDB returns the number of non-confirmed conflicts.
func GossipInboundPackets ¶ added in v0.8.2
func GossipInboundPackets() uint64
GossipInboundPackets returns the total amount of inbound gossip packets.
func GossipOutboundPackets ¶ added in v0.8.2
func GossipOutboundPackets() uint64
GossipOutboundPackets returns the total amount of outbound gossip packets.
func InitialBlockCountPerComponentGrafana ¶ added in v0.9.2
func InitialBlockCountPerComponentGrafana() map[ComponentType]uint64
InitialBlockCountPerComponentGrafana returns a map of block count per component types and their count at the start of the node.
func InitialBlockMissingCountDB ¶ added in v0.9.2
func InitialBlockMissingCountDB() uint64
InitialBlockMissingCountDB returns the number of blocks in missingBlockStore at startup.
func InitialSchedulerTime ¶ added in v0.8.4
func InitialSchedulerTime() (result int64)
InitialSchedulerTime returns the cumulative time it took for all block to become scheduled at startup [milliseconds].
func InitialSumTimeSinceReceived ¶ added in v0.8.4
func InitialSumTimeSinceReceived() map[ComponentType]int64
InitialSumTimeSinceReceived returns the cumulative time it took for all block to be processed by each component since being received at startup [milliseconds].
func LastCommittedEpoch ¶ added in v0.9.2
LastCommittedEpoch returns the last committed epoch.
func MemUsage ¶ added in v0.2.0
func MemUsage() uint64
MemUsage returns the current memory allocated as bytes.
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 ParentCountPerType ¶ added in v0.8.0
func ParentCountPerType() map[tangleold.ParentsType]uint64
ParentCountPerType returns a map of parent counts per parent type.
func RateSetterBufferSize ¶ added in v0.9.1
func RateSetterBufferSize() int
RateSetterBufferSize number of ready blocks in the rate setter buffer.
func RateSetterEstimate ¶ added in v0.9.1
func RateSetterEstimate() int64
RateSetterEstimate returns the maximum buffer size.
func SchedulerBufferSize ¶ added in v0.8.4
func SchedulerBufferSize() int
SchedulerBufferSize number of bytes waiting to be scheduled.
func SchedulerDeficit ¶ added in v0.9.1
func SchedulerDeficit() float64
SchedulerDeficit local node's deficit value.
func SchedulerMaxBufferSize ¶ added in v0.8.4
func SchedulerMaxBufferSize() int
SchedulerMaxBufferSize returns the maximum buffer size.
func SchedulerNodeAManaAmount ¶ added in v0.8.4
SchedulerNodeAManaAmount current aMana value for each node in the queue.
func SchedulerNodeQueueSizes ¶ added in v0.8.4
SchedulerNodeQueueSizes current size of each node's queue.
func SchedulerRate ¶ added in v0.8.4
func SchedulerRate() int64
SchedulerRate rate at which blocks are scheduled.
func SchedulerReadyBlocksCount ¶ added in v0.9.2
func SchedulerReadyBlocksCount() int
SchedulerReadyBlocksCount number of ready blocks in the scheduler buffer.
func SchedulerTime ¶ added in v0.8.4
func SchedulerTime() (result int64)
SchedulerTime returns the cumulative time it took for all block to become scheduled before startup [milliseconds].
func SchedulerTotalBufferBlocksCount ¶ added in v0.9.2
func SchedulerTotalBufferBlocksCount() int
SchedulerTotalBufferBlocksCount returns if the node is synced based on tangle time.
func SolidificationRequests ¶ added in v0.8.4
func SolidificationRequests() uint64
SolidificationRequests returns the number of solidification requests since start of node.
func SumTimeSinceIssued ¶ added in v0.8.4
func SumTimeSinceIssued() map[ComponentType]int64
SumTimeSinceIssued returns the cumulative time it took for all block to be processed by each component since being issued [milliseconds].
func SumTimeSinceReceived ¶ added in v0.8.4
func SumTimeSinceReceived() map[ComponentType]int64
SumTimeSinceReceived returns the cumulative time it took for all block to be processed by each component since being received since startup [milliseconds].
func TangleTimeSynced ¶ added in v0.5.8
func TangleTimeSynced() bool
TangleTimeSynced returns if the node is synced based on tangle time.
func TotalConflictCountDB ¶ added in v0.9.2
func TotalConflictCountDB() uint64
TotalConflictCountDB returns the total number of conflicts.
Types ¶
type BlockType ¶ added in v0.9.2
type BlockType byte
BlockType defines the component for the different BPS metrics.
type ComponentCounterUpdatedEvent ¶ added in v0.9.0
type ComponentCounterUpdatedEvent struct {
ComponentStatus map[ComponentType]uint64
}
type ComponentType ¶ added in v0.4.0
type ComponentType byte
ComponentType defines the component for the different BPS metrics.
const ( // Store denotes blocks stored by the block store. Store ComponentType = iota // Solidifier denotes blocks solidified by the solidifier. Solidifier // Scheduler denotes blocks scheduled by the scheduler. Scheduler // SchedulerDropped denotes blocks dropped by the scheduler. SchedulerDropped // SchedulerSkipped denotes confirmed blocks skipped by the scheduler. SchedulerSkipped // Booker denotes blocks 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 EventsStruct ¶ added in v0.9.0
type EventsStruct struct { // Fired when the blocks per second metric is updated. ReceivedBPSUpdated *event.Event[*ReceivedBPSUpdatedEvent] // Fired when the transactions per second metric is updated. ReceivedTPSUpdated *event.Event[*ReceivedTPSUpdatedEvent] // Fired when the component counter per second metric is updated. ComponentCounterUpdated *event.Event[*ComponentCounterUpdatedEvent] // RateSetterUpdated is fired when the rate setter metric is updated. RateSetterUpdated *event.Event[*RateSetterMetric] }
var Events *EventsStruct
Events defines the events of the plugin.
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 ParametersDefinition ¶ added in v0.7.4
type ParametersDefinition struct { // Local defines whether to collect local metrics. Local bool `default:"true" usage:"include local metrics"` // Global defines whether to collect global metrics. Global bool `default:"false" usage:"include global metrics"` // ManaUpdateInterval defines interval between mana metrics refreshes. ManaUpdateInterval time.Duration `default:"30s" usage:"mana metrics update interval"` // MetricsManaResearch defines whether to collect research mana metrics. ManaResearch bool `default:"false" usage:"include research mana metrics"` }
ParametersDefinition contains the definition of the parameters used by the metrics plugin.
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.
type RateSetterMetric ¶ added in v0.9.1
RateSetterMetric is the metric for the rate setter.
type ReceivedBPSUpdatedEvent ¶ added in v0.9.2
type ReceivedBPSUpdatedEvent struct {
BPS uint64
}
type ReceivedTPSUpdatedEvent ¶ added in v0.9.0
type ReceivedTPSUpdatedEvent struct {
TPS uint64
}