Documentation ¶
Index ¶
- Variables
- func AggrAny(points []point.Point) (r float64)
- func AggrAnyLast(points []point.Point) (r float64)
- func AggrAvg(points []point.Point) (r float64)
- func AggrMax(points []point.Point) (r float64)
- func AggrMin(points []point.Point) (r float64)
- func AggrSum(points []point.Point) (r float64)
- type Aggr
- type ClickhouseRollupXML
- type Pattern
- type PatternXML
- type Retention
- type RetentionXML
- type Rollup
- type Rules
- func (r *Rules) Lookup(metric string, age uint32) (precision uint32, ag *Aggr)
- func (r *Rules) LookupBytes(metric []byte, age uint32) (precision uint32, ag *Aggr)
- func (r *Rules) RollupMetric(metricName string, from uint32, points []point.Point) ([]point.Point, uint32, error)
- func (r *Rules) RollupMetricAge(metricName string, age uint32, points []point.Point) ([]point.Point, uint32, error)
- func (r *Rules) RollupPoints(pp *point.Points, from int64, step int64) error
- type RulesXML
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AggrAnyLast ¶
Types ¶
type ClickhouseRollupXML ¶ added in v0.11.6
type ClickhouseRollupXML struct {
Rules RulesXML `xml:"graphite_rollup"`
}
type PatternXML ¶ added in v0.11.6
type PatternXML struct { Regexp string `xml:"regexp"` Function string `xml:"function"` Retention []*RetentionXML `xml:"retention"` }
type RetentionXML ¶ added in v0.11.6
type Rollup ¶
type Rollup struct {
// contains filtered or unexported fields
}
func NewDefault ¶ added in v0.11.6
func NewXMLFile ¶ added in v0.11.6
func (*Rollup) MarshalJSON ¶ added in v0.9.0
type Rules ¶ added in v0.9.0
func NewMockRules ¶ added in v0.13.0
func NewMockRules(pattern []Pattern, defaultPrecision uint32, defaultFunction string) (*Rules, error)
NewMockRulles creates mock rollup for tests
func (*Rules) Lookup ¶ added in v0.11.6
Lookup returns precision and aggregate function for metric name and age
func (*Rules) LookupBytes ¶ added in v0.11.6
LookupBytes returns precision and aggregate function for metric name and age
func (*Rules) RollupMetric ¶ added in v0.9.0
func (r *Rules) RollupMetric(metricName string, from uint32, points []point.Point) ([]point.Point, uint32, error)
RollupMetric rolling up list of points of ONE metric sorted by key "time" returns (new points slice, precision)
func (*Rules) RollupMetricAge ¶ added in v0.11.6
func (r *Rules) RollupMetricAge(metricName string, age uint32, points []point.Point) ([]point.Point, uint32, error)
RollupMetricAge rolling up list of points of ONE metric sorted by key "time" returns (new points slice, precision)
func (*Rules) RollupPoints ¶ added in v0.12.0
RollupPoints groups sorted Points by metric name and apply rollup one by one. If the `step` parameter is 0, it will be got from the current *Rules, otherwise it will be used directly.
type RulesXML ¶ added in v0.11.6
type RulesXML struct { Pattern []*PatternXML `xml:"pattern"` Default *PatternXML `xml:"default"` }
Click to show internal directories.
Click to hide internal directories.