function

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvgCall

func AvgCall(arrays ...*collections.FloatArray) *collections.FloatArray

func FuncCall

func FuncCall(funcType FuncType, params ...*collections.FloatArray) *collections.FloatArray

FuncCall calls the function calc by function type and params

func IsSupportOrderBy

func IsSupportOrderBy(t FuncType) bool

IsSupportOrderBy checks if function support order by.

func QuantileCall

func QuantileCall(q float64, histogramFields map[float64][]*collections.FloatArray) (*collections.FloatArray, error)

QuantileCall references to prometheus implementation. https://github.com/prometheus/prometheus/blob/39d79c3cfb86c47d6bc06a9e9317af582f1833bb/promql/quantile.go 0 <= q <= 1 q = 0, returns 0 q = 1, last UpperBound before Inf is returned

func RateCall

func RateCall(interval int64, params ...*collections.FloatArray) *collections.FloatArray

RateCall represents rate function call.

Types

type FuncType

type FuncType int

FuncType is the definition of function type

const (
	Unknown FuncType = iota
	Sum
	Min
	Max
	Count
	Avg
	Last
	First
	Quantile
	Stddev
	Rate
)

func (FuncType) String

func (t FuncType) String() string

String return the function's name

Jump to

Keyboard shortcuts

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