common

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateData

func AggregateData(metricList []metricapi.Metric, metricName string,
	aggregationName metricapi.AggregationMode) metricapi.Metric

AggregateData aggregates all the data from dataList using AggregatingFunction with name aggregateName. Standard data aggregation function.

func AggregateMetricPromises

func AggregateMetricPromises(metricPromises metricapi.MetricPromises, metricName string,
	aggregations metricapi.AggregationModes, forceLabel metricapi.Label) metricapi.MetricPromises

AggregateMetricPromises aggregates all data from metric promises using AggregatingFunction with name aggregateName.

func AggregatingMapFromDataList

func AggregatingMapFromDataList(metricList []metricapi.Metric, metricName string) (
	map[int64][]int64, metricapi.Label)

AggregatingMapFromDataList for all Data entries of given metric generates a cumulative map X -> [List of all Ys at this X]. Afterwards this list of Ys can be easily aggregated.

Types

type SortableInt64

type SortableInt64 []int64

SortableInt64 implements sort.Interface for []int64. This allows to use built in sort with int64.

func (SortableInt64) Len

func (a SortableInt64) Len() int

func (SortableInt64) Less

func (a SortableInt64) Less(i, j int) bool

func (SortableInt64) Swap

func (a SortableInt64) Swap(i, j int)

Jump to

Keyboard shortcuts

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