Documentation
¶
Overview ¶
Package stats implements a Prometheus Collector for LMDBs
Package stats implements a Prometheus Collector for LMDBs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Log ¶
Log logs all LMDB statistics once using logrus If dbnames is nil, all databases are logged.
func PageUsageBytes ¶
PageUsageBytes estimates bytes of map size used based on used pages
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector implements an LMDB stats collector for Prometheus. It must be registered with Prometheus before it actually works. It can only be registered once!
func NewCollector ¶
NewCollector creates a new Collector. 'withSmaps' indicates if we need to collect /proc/self/smaps if available (Linux). Note that smaps collection could potentially be expensive.
func (*Collector) Collect ¶
func (c *Collector) Collect(ch chan<- prometheus.Metric)
Collect is part of the prometheus.Collect interface. It fetches statistics from LMDB.
func (*Collector) Describe ¶
func (c *Collector) Describe(ch chan<- *prometheus.Desc)
Describe is part of the prometheus.Collect interface