prom

package
v1.11.6-statediff-5.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecActiveIterCount

func DecActiveIterCount()

DecActiveIterCount decrements the number of active iterators

func Enabled

func Enabled() bool

func IncActiveIterCount

func IncActiveIterCount()

IncActiveIterCount increments the number of active iterators

func IncCodeNodeCount

func IncCodeNodeCount()

IncCodeNodeCount increments the number of code nodes processed

func IncStateNodeCount

func IncStateNodeCount()

IncStateNodeCount increments the number of state nodes processed

func IncStorageNodeCount

func IncStorageNodeCount()

IncStorageNodeCount increments the number of storage nodes processed

func Init

func Init()

func RegisterDBCollector

func RegisterDBCollector(name string, db DBStatsGetter)

RegisterDBCollector create metric collector for given connection

func RegisterGaugeFunc

func RegisterGaugeFunc(name string, function func() float64)

func Serve

func Serve(addr string) *http.Server

Serve start listening http

Types

type DBStatsCollector

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

DBStatsCollector implements the prometheus.Collector interface.

func NewDBStatsCollector

func NewDBStatsCollector(dbName string, sg DBStatsGetter) *DBStatsCollector

NewDBStatsCollector creates a new DBStatsCollector.

func (DBStatsCollector) Collect

func (c DBStatsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (DBStatsCollector) Describe

func (c DBStatsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type DBStatsGetter

type DBStatsGetter interface {
	Stats() mets.DbStats
}

DBStatsGetter is an interface that gets sql.DBStats.

Jump to

Keyboard shortcuts

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