metrics

package
v1.3.22 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilStatusHandlerUtils = fmt.Errorf("nil StatusHandlerUtils when initializing metrics")

ErrNilStatusHandlerUtils signals that a nil status handler utils instance has been provided

Functions

func InitBaseMetrics

func InitBaseMetrics(statusHandlerUtils StatusHandlersUtils) error

InitBaseMetrics will initialize base, default metrics to 0 values

func InitConfigMetrics

func InitConfigMetrics(statusHandlerUtils StatusHandlersUtils, epochConfig config.EpochConfig, economicsConfig config.EconomicsConfig) error

InitConfigMetrics will init the "enable epochs" configuration metrics from epoch config

func InitMetrics

func InitMetrics(
	statusHandlerUtils StatusHandlersUtils,
	pubkeyStr string,
	nodeType core.NodeType,
	shardCoordinator sharding.Coordinator,
	nodesConfig sharding.GenesisNodesSetupHandler,
	version string,
	economicsConfig *config.EconomicsConfig,
	roundsPerEpoch int64,
	minTransactionVersion uint32,
) error

InitMetrics will init metrics for status handler

func SaveStringMetric

func SaveStringMetric(ash core.AppStatusHandler, key, value string)

SaveStringMetric will save a string metric in status handler

func SaveUint64Metric

func SaveUint64Metric(ash core.AppStatusHandler, key string, value uint64)

SaveUint64Metric will save a uint64 metric in status handler

Types

type StatusHandlersUtils

type StatusHandlersUtils interface {
	StatusHandler() core.AppStatusHandler
	IsInterfaceNil() bool
}

StatusHandlersUtils provides some functionality for statusHandlers

Jump to

Keyboard shortcuts

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