g_metrics

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReceivedWaitVHashCount  = "wait_v_block_hash_count"
	ReceivedWaitVBlockCount = "wait_v_block_block_count"

	ReceivedHashCount  = "v_block_hash_count"
	ReceivedBlockCount = "v_block_block_count"

	// peers metrics
	NorPeerSetGauge   = "normal_peer_set"
	CurPeerSetGauge   = "cur_peer_set"
	NextPeerSetGauge  = "next_peer_set"
	VBootPeerSetGauge = "v_boot_peer_set"
	// The number of  handle peers have been processed
	TotalHandledPeer = "pm_total_handle"
	// The number of successful handshakes
	TotalSuccessHandle = "pm_total_handle_success"
	// The number of failed handshaking
	TotalFailedHandle = "pm_total_handle_failed"
	// Current peer processing statistics
	CurHandelPeer = "pm_cur_handle_peer"
	// running peer count
	RunningPeerGauge = "p2p_running_peers"

	// BFT fetch block
	FetchBlockGoCount = "pbft_fetch_block_go_count"
	BftCurStateGauge  = "pbft_state"
	BftCurRoundGauge  = "pbft_round"
	BftTimeoutCount   = "pbft_timeout"

	// v halt check
	CurBlockNumberGauge = "verBootNodeBlockNumber"

	PendingTxCountInPool = "pending_tx_count_in_pool"
	QueuedTxCountInPool  = "queued_tx_count_in_pool"

	CurChainHeight         = "cur_height"
	FailedInsertBlockCount = "failed_insert_block_count"
)

Variables

This section is empty.

Functions

func Add

func Add(name string, label string, value float64)

func CreateCounter

func CreateCounter(name string, help string, label []string)

func CreateGauge

func CreateGauge(name string, help string, label []string)

func EnableMeter

func EnableMeter()

func InitCSMetrics

func InitCSMetrics()

call this after NewPrometheusMetricsServer

func Set

func Set(name string, label string, value float64)

func Sub

func Sub(name string, label string, value float64)

Types

type PrometheusMetricsServer

type PrometheusMetricsServer struct {
	// contains filtered or unexported fields
}

func NewPrometheusMetricsServer

func NewPrometheusMetricsServer(port int) *PrometheusMetricsServer

This method should be placed at the forefront to ensure that it can be call before other services are registered.

func (*PrometheusMetricsServer) Start

func (p *PrometheusMetricsServer) Start() error

func (*PrometheusMetricsServer) Stop

func (p *PrometheusMetricsServer) Stop()

Jump to

Keyboard shortcuts

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