rollup

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggrAny

func AggrAny(points []point.Point) (r float64)

func AggrAnyLast

func AggrAnyLast(points []point.Point) (r float64)

func AggrAvg

func AggrAvg(points []point.Point) (r float64)

func AggrMax

func AggrMax(points []point.Point) (r float64)

func AggrMin

func AggrMin(points []point.Point) (r float64)

func AggrSum

func AggrSum(points []point.Point) (r float64)

Types

type Pattern

type Pattern struct {
	Regexp    string       `xml:"regexp"`
	Function  string       `xml:"function"`
	Retention []*Retention `xml:"retention"`
	// contains filtered or unexported fields
}

type Retention

type Retention struct {
	Age       int32 `xml:"age"`
	Precision int32 `xml:"precision"`
}

type Rollup

type Rollup struct {
	Pattern []*Pattern `xml:"pattern"`
	Default *Pattern   `xml:"default"`
}

func ParseXML

func ParseXML(body []byte) (*Rollup, error)

func (*Rollup) Match

func (r *Rollup) Match(metric string) *Pattern

Match returns rollup rules for metric

func (*Rollup) RollupMetric

func (r *Rollup) RollupMetric(points []point.Point) ([]point.Point, int32)

RollupMetric rolling up list of points of ONE metric sorted by key "time" returns (new points slice, precision)

func (*Rollup) Step

func (r *Rollup) Step(metric string, from int32) int32

Jump to

Keyboard shortcuts

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