Documentation ¶
Index ¶
- type Metric
- type Metrics
- func (m *Metrics) Add(kv Metric)
- func (m Metrics) FindByName(name string) Metrics
- func (m Metrics) FindByNames(names ...string) Metrics
- func (m Metrics) Len() int
- func (m Metrics) Less(i, j int) bool
- func (m Metrics) Match(matcher *labels.Matcher) Metrics
- func (m Metrics) Max() float64
- func (m *Metrics) Reset()
- func (m Metrics) Sort()
- func (m Metrics) Swap(i, j int)
- type Prometheus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics []Metric
Metrics is a list of Metric
func (Metrics) FindByName ¶
FindByName finds metrics where it's __name__ label matches given name. It expects the metrics is sorted. Complexity: O(log(N))
func (Metrics) FindByNames ¶ added in v0.2.0
FindByNames finds metrics where it's __name__ label matches given any of names. It expects the metrics is sorted. Complexity: O(log(N))
func (Metrics) Less ¶
Less reports whether the element with index i should sort before the element with index j.
func (Metrics) Match ¶
Match match finds metrics where it's label matches given matcher. It does NOT expect the metrics is sorted. Complexity: O(N)
func (Metrics) Max ¶
Max returns the max value. It do NOT expect the metrics is sorted. Complexity: O(N)
Click to show internal directories.
Click to hide internal directories.