metrics

package
v2.0.0-beta.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PoWCompletedCaller

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

Types

type DatabaseMetrics

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 INXEvents

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

type INXMetrics

type INXMetrics struct {
	// The total number of completed PoW requests.
	PoWCompletedCounter atomic.Uint32

	Events *INXEvents
}

INXMetrics defines INX metrics over the entire runtime of the node.

func (*INXMetrics) PoWCompleted

func (m *INXMetrics) PoWCompleted(blockSize int, duration time.Duration)

type PoWMetrics

type PoWMetrics interface {
	PoWCompleted(blockSize int, duration time.Duration)
}

type RestAPIEvents

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

type RestAPIMetrics

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

	Events *RestAPIEvents
}

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

func (*RestAPIMetrics) PoWCompleted

func (m *RestAPIMetrics) PoWCompleted(blockSize int, duration time.Duration)

type ServerMetrics

type ServerMetrics struct {
	// The number of total received blocks.
	Blocks atomic.Uint32
	// The number of received blocks which are new.
	NewBlocks atomic.Uint32
	// The number of received blocks which are already known.
	KnownBlocks atomic.Uint32
	// The number of referenced blocks.
	ReferencedBlocks atomic.Uint32
	// The number of blocks with a transaction payload.
	IncludedTransactionBlocks atomic.Uint32
	// The number of blocks without a transaction payload.
	NoTransactionBlocks atomic.Uint32
	// The number of blocks with conflicting transaction payloads.
	ConflictingTransactionBlocks atomic.Uint32
	// The number of received invalid blocks.
	InvalidBlocks atomic.Uint32
	// The number of received invalid requests (both blocks and milestones).
	InvalidRequests atomic.Uint32
	// The number of received milestone requests.
	ReceivedMilestoneRequests atomic.Uint32
	// The number of received block requests.
	ReceivedBlockRequests atomic.Uint32
	// The number of received heartbeats.
	ReceivedHeartbeats atomic.Uint32
	// The number of sent blocks.
	SentBlocks atomic.Uint32
	// The number of sent block requests.
	SentBlockRequests atomic.Uint32
	// The number of sent milestone requests.
	SentMilestoneRequests atomic.Uint32
	// The number of sent heartbeats.
	SentHeartbeats atomic.Uint32
	// The number of dropped packets.
	DroppedPackets atomic.Uint32
	// The number of sent spam blocks.
	SentSpamBlocks 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

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