metrics

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PoWCompletedCaller added in v1.2.2

func PoWCompletedCaller(handler interface{}, params ...interface{})

Types

type DatabaseMetrics added in v1.2.2

type DatabaseMetrics struct {
	// The total number of compactions.
	CompactionCount atomic.Uint32
	// Whether compaction is running or not.
	CompactionRunning atomic.Bool
}

DatabaseMetrics defines database metrics over the entire runtime of the node.

type RestAPIEvents added in v1.2.2

type RestAPIEvents struct {
	// PoWCompleted is fired when a PoW request is completed.
	PoWCompleted *events.Event
}

type RestAPIMetrics added in v1.2.2

type RestAPIMetrics struct {
	// The total number HTTP request errors.
	HTTPRequestErrorCounter atomic.Uint32
	// The total number completed PoW requests.
	PoWCompletedCounter atomic.Uint32

	Events *RestAPIEvents
}

RestAPIMetrics defines REST API metrics over the entire runtime of the node.

func (*RestAPIMetrics) TriggerPoWCompleted added in v1.2.2

func (m *RestAPIMetrics) TriggerPoWCompleted(messageSize int, duration time.Duration)

type ServerMetrics

type ServerMetrics struct {
	// The number of total received messages.
	Messages atomic.Uint32
	// The number of received messages which are new.
	NewMessages atomic.Uint32
	// The number of received messages which are already known.
	KnownMessages atomic.Uint32
	// The number of referenced messages.
	ReferencedMessages atomic.Uint32
	// The number of messages with a transaction payload.
	IncludedTransactionMessages atomic.Uint32
	// The number of messages without a transaction payload.
	NoTransactionMessages atomic.Uint32
	// The number of messages with conflicting transaction payloads.
	ConflictingTransactionMessages atomic.Uint32
	// The number of received invalid messages.
	InvalidMessages atomic.Uint32
	// The number of received invalid requests (both messages and milestones).
	InvalidRequests atomic.Uint32
	// The number of received milestone requests.
	ReceivedMilestoneRequests atomic.Uint32
	// The number of received message requests.
	ReceivedMessageRequests atomic.Uint32
	// The number of received heartbeats.
	ReceivedHeartbeats atomic.Uint32
	// The number of sent messages.
	SentMessages atomic.Uint32
	// The number of sent message requests.
	SentMessageRequests atomic.Uint32
	// The number of sent milestone requests.
	SentMilestoneRequests atomic.Uint32
	// The number of sent heartbeats.
	SentHeartbeats atomic.Uint32
	// The number of dropped messages.
	DroppedMessages atomic.Uint32
	// The number of sent spam messages.
	SentSpamMessages atomic.Uint32
	// The number of validated messages.
	ValidatedMessages atomic.Uint32
	// The number of non-lazy tips.
	TipsNonLazy atomic.Uint32
	// The number of semi-lazy tips.
	TipsSemiLazy atomic.Uint32
}

ServerMetrics defines metrics over the entire runtime of the node.

type StorageMetrics added in v1.2.2

type StorageMetrics struct {
	// The total number of prunings.
	Prunings atomic.Uint32
	// Whether pruning is running or not.
	PruningRunning atomic.Bool
}

StorageMetrics defines storage metrics over the entire runtime of the node.

Jump to

Keyboard shortcuts

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