metrics

package
v1.9.10-rc.8 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Height

type Height interface {
	Accepted(height uint64)
}

Height reports the last accepted height

func NewHeight

func NewHeight(namespace string, reg prometheus.Registerer) (Height, error)

type Latency

type Latency interface {
	// Issued marks the item as having been issued.
	Issued(id ids.ID, pollNumber uint64)

	// Accepted marks the item as having been accepted.
	// Pass the container size in bytes for metrics tracking.
	Accepted(id ids.ID, pollNumber uint64, containerSize int)

	// Rejected marks the item as having been rejected.
	// Pass the container size in bytes for metrics tracking.
	Rejected(id ids.ID, pollNumber uint64, containerSize int)

	// MeasureAndGetOldestDuration returns the amount of time the oldest item
	// has been processing.
	MeasureAndGetOldestDuration() time.Duration

	// NumProcessing returns the number of currently processing items.
	NumProcessing() int
}

func NewLatency

func NewLatency(metricName, descriptionName string, log logging.Logger, namespace string, reg prometheus.Registerer) (Latency, error)

Initialize the metrics with the provided names.

type Polls

type Polls interface {
	Successful()
	Failed()
}

Polls reports commonly used consensus poll metrics.

func NewPolls

func NewPolls(namespace string, reg prometheus.Registerer) (Polls, error)

type Timestamp added in v1.9.2

type Timestamp interface {
	Accepted(ts time.Time)
}

Timestamp reports the last accepted block time, to track it in unix seconds.

func NewTimestamp added in v1.9.2

func NewTimestamp(namespace string, reg prometheus.Registerer) (Timestamp, error)

Jump to

Keyboard shortcuts

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