package
0.0.1
Repository: https://github.com/libonomy/libonomy-p2p.git
Documentation: pkg.go.dev

# Functions

NewCounter creates a Counter metrics under the global namespace returns nop if metrics are disabled.
NewGauge creates a Gauge metrics under the global namespace returns nop if metrics are disabled.
NewHistogram creates a Histogram metrics under the global namespace returns nop if metrics are disabled.
NewMeteredCache wraps cache with metrics are returns a monitored cache.
StartCollectingMetrics begins listening and supplying metrics on localhost:`metricsPort`/metrics.

# Constants

Namespace is the basic namespace where all metrics are defined under.
ResultLabel makes a consistent name for results.

# Variables

Enabled variable is used to turn on or of the metrics server.

# Structs

MeteredCache is a wrapper around a cache that monitors size, hits and misses.

# Interfaces

Cache is a basic cache interface that we can wrap to meter.

# Type aliases

Counter is a metric type used to represent a monotonically increased/decreased numeric value.
Gauge is a metric type used to represent a numeric value.
Histogram is a metric type used to sum up multiple observations over time.