metrics

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabelHash

type LabelHash struct {
	// This is a hash over the label names
	Names NameHash
	// This is a hash over the label names + label values
	Values ValueHash
}

type Metric

type Metric struct {
	MetricType MetricType
	// Vectors key is the hash of the label names
	Vectors map[NameHash]*Vector
	// Metrics key is a hash of the label names + label values
	Metrics map[ValueHash]*RegisteredMetric
}

type MetricHolder

type MetricHolder interface{}

type MetricType

type MetricType int
const (
	CounterMetricType MetricType = iota
	GaugeMetricType
	SummaryMetricType
	HistogramMetricType
)

type NameHash

type NameHash uint64

type RegisteredMetric

type RegisteredMetric struct {
	LastRegisteredAt time.Time
	Labels           prometheus.Labels
	TTL              time.Duration
	Metric           MetricHolder
	VecKey           NameHash
}

type ValueHash

type ValueHash uint64

type Vector

type Vector struct {
	Holder   VectorHolder
	RefCount uint64
}

type VectorHolder

type VectorHolder interface {
	Delete(label prometheus.Labels) bool
}

Jump to

Keyboard shortcuts

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