aggregation

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SumType adds all non nan elements in a list of series.
	SumType = "sum"
	// MinType takes the minimum all non nan elements in a list of series.
	MinType = "min"
	// MaxType takes the maximum all non nan elements in a list of series.
	MaxType = "max"
	// AverageType averages all non nan elements in a list of series.
	AverageType = "avg"
	// StandardDeviationType takes the population standard deviation of all non
	// nan elements in a list of series.
	StandardDeviationType = "stddev"
	// StandardVarianceType takes the population standard variance of all non
	// nan elements in a list of series.
	StandardVarianceType = "var"
	// CountType counts all non nan elements in a list of series.
	CountType = "count"
)
View Source
const (
	// BottomKType gathers the smallest k non nan elements in a list of series
	BottomKType = "bottomk"
	// TopKType gathers the largest k non nan elements in a list of series
	TopKType = "topk"
)
View Source
const (
	// AbsentType returns 1 if there are no elements in this step, or if no series
	// are present in the current block.
	AbsentType = "absent"
)
View Source
const (
	// CountValuesType counts the number of non nan elements with the same value.
	CountValuesType = "count_values"
)
View Source
const (
	// QuantileType takes the n-th non nan quantile element in a list of series
	// Special cases are:
	// 	 n < 0 = -Inf
	// 	 n > 1 = +Inf
	QuantileType = "quantile"
)

Variables

This section is empty.

Functions

func NewAbsentOp added in v0.11.0

func NewAbsentOp() parser.Params

NewAbsentOp creates a new absent operation.

func NewAggregationOp

func NewAggregationOp(
	opType string,
	params NodeParams,
) (parser.Params, error)

NewAggregationOp creates a new aggregation operation.

func NewCountValuesOp added in v0.4.3

func NewCountValuesOp(
	opType string,
	params NodeParams,
) (parser.Params, error)

NewCountValuesOp creates a new count values operation.

func NewTakeOp added in v0.4.3

func NewTakeOp(
	opType string,
	params NodeParams,
) (parser.Params, error)

NewTakeOp creates a new takeK operation

Types

type NodeParams

type NodeParams struct {
	// MatchingTags is the set of tags by which the aggregation groups
	// output series.
	MatchingTags [][]byte
	// Without indicates if series should use only the MatchingTags or if
	// MatchingTags should be excluded from grouping.
	Without bool
	// Parameter is the param value for the aggregation op when appropriate.
	Parameter float64
	// StringParameter is the string representation of the param value.
	StringParameter string
}

NodeParams contains additional parameters required for aggregation ops.

Jump to

Keyboard shortcuts

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