metrics

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	// Clock gives access to the current wall clock time
	Clock timer.Clock

	// ProcessingEntries keeps track of the time that each item was issued into
	// the consensus instance. This is used to calculate the amount of time to
	// accept or reject the item.
	ProcessingEntries linkedhashmap.LinkedHashmap
	// contains filtered or unexported fields
}

Metrics reports commonly used consensus metrics.

func (*Metrics) Accepted

func (m *Metrics) Accepted(id ids.ID)

Accepted marks the item as having been accepted.

func (*Metrics) Initialize

func (m *Metrics) Initialize(metricName, descriptionName string, log logging.Logger, namespace string, registerer prometheus.Registerer) error

Initialize the metrics with the provided names.

func (*Metrics) Issued

func (m *Metrics) Issued(id ids.ID)

Issued marks the item as having been issued.

func (*Metrics) Rejected

func (m *Metrics) Rejected(id ids.ID)

Rejected marks the item as having been rejected.

Jump to

Keyboard shortcuts

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