opcodemetrics

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgOpsCount = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace:   consts.MetricsNamespace,
		Name:        "msg_op_total",
		Help:        "The total number of times we encounter a given message opcode. For internal use only.",
		ConstLabels: nil,
	}, []string{"msg_op"})

	LatencyStats = prometheus.NewHistogramVec(prometheus.HistogramOpts{
		Namespace:   consts.MetricsNamespace,
		Name:        "handling_latency",
		Help:        "The latency of handling messages in us.",
		Buckets:     []float64{50, 100, 500, 1000, 10000, 100000},
		ConstLabels: nil,
	}, []string{"op"})
)

Functions

func GetOpTotal

func GetOpTotal(opcode ops.OpCode) prometheus.Counter

Get a new handle on a msgOpsCount metric for an OpCode

func InitMetrics added in v0.11.0

func InitMetrics()

func OpTotalInc

func OpTotalInc(opcode ops.OpCode)

Increment an msgOpsCount for an OpCode

func RegisterMetrics added in v1.2.0

func RegisterMetrics(group metrics.Group)

Types

This section is empty.

Jump to

Keyboard shortcuts

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