metrics

package
v0.0.0-...-ac76756 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CosMetrics

type CosMetrics struct {
	// No.of validators
	Validators metrics.Gauge
	// No.of rounds
	Rounds metrics.Gauge
	// No.of transactions in the block
	NumTxs metrics.Gauge

	//Time between current block and the previous block in seconds
	BlockInterval metrics.Gauge
}

Metrics represents the consensus metrics

func GetCosPrometheusMetrics

func GetCosPrometheusMetrics(namespace string, labelsWithValues ...string) *CosMetrics

GetCosPrometheusMetrics return the consensus metrics instance

func NewCosMetrics

func NewCosMetrics() *CosMetrics

NewCosMetrics will return the non operational metrics

type P2PMetrics

type P2PMetrics struct {
	// No.of connected peers
	Peers metrics.Gauge
}

Metrics represents the network metrics

func GetP2PPrometheusMetrics

func GetP2PPrometheusMetrics(namespace string, labelsWithValues ...string) *P2PMetrics

GetP2PPrometheusMetrics return the network metrics instance

func NewP2PMetrics

func NewP2PMetrics() *P2PMetrics

NewP2PMetrics will return the non operational metrics

type ServerMetrics

type ServerMetrics struct {
	Consensus *CosMetrics
	Network   *P2PMetrics
	Txpool    *TxMetrics
}

ServerMetrics holds the metric instances of all sub systems

func MetricProvider

func MetricProvider(nameSpace string, chainID string, metricsRequired bool) *ServerMetrics

metricProvider serverMetric instance for the given ChainID and nameSpace

type TxMetrics

type TxMetrics struct {
	// Pending transactions
	PendingTxs metrics.Gauge
}

Metrics represents the txpool metrics

func GetTxPrometheusMetrics

func GetTxPrometheusMetrics(namespace string, labelsWithValues ...string) *TxMetrics

GetTxPrometheusMetrics return the txpool metrics instance

func NewTxMetrics

func NewTxMetrics() *TxMetrics

NewTxMetrics will return the non operational txpool metrics

Jump to

Keyboard shortcuts

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