metrics

package
v0.2.4-0...-2c2ceb1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2020 License: Apache-2.0, BSD-2-Clause Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const PluginName = "Metrics"

PluginName is the name of the metrics plugin.

Variables

View Source
var Events = pluginEvents{

	ReceivedMPSUpdated: events.NewEvent(uint64EventCaller),
	ReceivedTPSUpdated: events.NewEvent(uint64EventCaller),
}

Events defines the events of the plugin.

Functions

func ActiveConflicts

func ActiveConflicts() uint64

ActiveConflicts returns the number of currently active conflicts.

func AnalysisOutboundBytes

func AnalysisOutboundBytes() uint64

AnalysisOutboundBytes returns the total outbound analysis traffic.

func AutopeeringDistanceStats

func AutopeeringDistanceStats() (min, max uint64, avg float64)

AutopeeringDistanceStats returns statistics of the autopeering distance function.

func AverageRoundsToFinalize

func AverageRoundsToFinalize() float64

AverageRoundsToFinalize returns the average number of rounds it takes to finalize conflicts since the start of the node.

func AvgNeighborConnectionLifeTime

func AvgNeighborConnectionLifeTime() float64

AvgNeighborConnectionLifeTime return the average neighbor connection lifetime.

func AvgSolidificationTime

func AvgSolidificationTime() (result float64)

AvgSolidificationTime returns the average time it takes for a message to become solid. [milliseconds]

func CPUUsage

func CPUUsage() float64

CPUUsage returns the current cpu usage.

func FPCInboundBytes

func FPCInboundBytes() uint64

FPCInboundBytes returns the total inbound FPC traffic.

func FPCOpinionQueryReceived

func FPCOpinionQueryReceived() uint64

FPCOpinionQueryReceived returns the number of received opinion queries.

func FPCOpinionQueryReplyErrors

func FPCOpinionQueryReplyErrors() uint64

FPCOpinionQueryReplyErrors returns the number of opinions that the node failed to gather from peers.

func FPCOutboundBytes

func FPCOutboundBytes() uint64

FPCOutboundBytes returns the total outbound FPC traffic.

func FPCQueryReceived

func FPCQueryReceived() uint64

FPCQueryReceived returns the number of received voting queries. For an exact number of opinion queries, use FPCOpinionQueryReceived().

func FPCQueryReplyErrors

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

func FailedConflicts() uint64

FailedConflicts returns the number of failed conflicts since the start of the node.

func FinalizedConflict

func FinalizedConflict() uint64

FinalizedConflict returns the number of finalized conflicts since the start of the node.

func GossipInboundBytes

func GossipInboundBytes() uint64

GossipInboundBytes returns the total inbound gossip traffic.

func GossipOutboundBytes

func GossipOutboundBytes() uint64

GossipOutboundBytes returns the total outbound gossip traffic.

func MemUsage

func MemUsage() uint64

MemUsage returns the current memory allocated as bytes.

func MessageCountSinceStartPerPayload

func MessageCountSinceStartPerPayload() map[payload.Type]uint64

MessageCountSinceStartPerPayload returns a map of message payload types and their count since the start of the node.

func MessageMissingCountDB

func MessageMissingCountDB() uint64

MessageMissingCountDB returns the number of messages in missingMessageStore.

func MessageRequestQueueSize

func MessageRequestQueueSize() int64

MessageRequestQueueSize returns the number of message requests the node currently has registered.

func MessageSolidCountDB

func MessageSolidCountDB() uint64

MessageSolidCountDB returns the number of messages that are solid in the DB.

func MessageTips

func MessageTips() uint64

MessageTips returns the actual number of tips in the message tangle.

func MessageTotalCountDB

func MessageTotalCountDB() uint64

MessageTotalCountDB returns the number of messages that are stored in the DB.

func MessageTotalCountSinceStart

func MessageTotalCountSinceStart() uint64

MessageTotalCountSinceStart returns the total number of messages seen since the start of the node.

func NeighborConnectionsCount

func NeighborConnectionsCount() uint64

NeighborConnectionsCount returns the neighbors connections count.

func NeighborDropCount

func NeighborDropCount() uint64

NeighborDropCount returns the neighbor drop count.

func NetworkDiameter

func NetworkDiameter() int32

NetworkDiameter returns the current network diameter.

func NodesMetrics

func NodesMetrics() map[string]NodeInfo

NodesMetrics returns info about the OS, arch, number of cpu cores, cpu load and memory usage.

func Plugin

func Plugin() *node.Plugin

Plugin gets the plugin instance.

func ReceivedMessagesPerSecond

func ReceivedMessagesPerSecond() uint64

ReceivedMessagesPerSecond retrieves the current messages per second number.

func Synced

func Synced() bool

Synced returns if the node is synced.

func ValueTips

func ValueTips() uint64

ValueTips returns the actual number of tips in the value tangle.

func ValueTransactionCounter

func ValueTransactionCounter() uint64

ValueTransactionCounter returns the number of value transactions seen.

Types

type NodeInfo

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL