Documentation
¶
Overview ¶
Package testutils provides utilities for tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelsMapByTarget ¶ added in v0.12.7
func LabelsMapByTarget(ems []*metrics.EventMetrics) map[string]map[string]string
func MetricsFromChannel ¶
func MetricsFromChannel(dataChan chan *metrics.EventMetrics, num int, timeout time.Duration) (results []*metrics.EventMetrics, err error)
MetricsFromChannel reads metrics.EventMetrics from dataChannel with a timeout
Types ¶
type MetricsMap ¶
func MetricsMapByTarget ¶ added in v0.12.7
func MetricsMapByTarget(ems []*metrics.EventMetrics) MetricsMap
MetricsMapByTarget rearranges a list of metrics into a map of map.
{
"target1": {
"m1": [val1, val2..],
"m2": [val1],
},
"target2": {
...
}
}
func (MetricsMap) Filter ¶ added in v0.12.7
func (mmap MetricsMap) Filter(metricName string) map[string][]metrics.Value
Filter returns a map of target to values for a given metric name.
func (MetricsMap) LastValueInt64 ¶ added in v0.12.7
func (mmap MetricsMap) LastValueInt64(target, metricName string) int64
LastValueInt64 returns the last value for a given metric name and target.
Click to show internal directories.
Click to hide internal directories.