Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AggregationGroupFactories = map[parser.ItemType]AggregationGroupFactory{ parser.AVG: func() AggregationGroup { return &AvgAggregationGroup{} }, parser.COUNT: func() AggregationGroup { return NewCountGroupAggregationGroup(true) }, parser.GROUP: func() AggregationGroup { return NewCountGroupAggregationGroup(false) }, parser.MAX: func() AggregationGroup { return NewMinMaxAggregationGroup(true) }, parser.MIN: func() AggregationGroup { return NewMinMaxAggregationGroup(false) }, parser.SUM: func() AggregationGroup { return &SumAggregationGroup{} }, }
Functions ¶
This section is empty.
Types ¶
type AggregationGroup ¶
type AggregationGroup interface { // AccumulateSeries takes in a series as part of the group AccumulateSeries(data types.InstantVectorSeriesData, timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker, emitAnnotationFunc functions.EmitAnnotationFunc) error // ComputeOutputSeries does any final calculations and returns the grouped series data ComputeOutputSeries(timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker) (types.InstantVectorSeriesData, bool, error) }
AggregationGroup accumulates series that have been grouped together and computes the output series data.
type AggregationGroupFactory ¶
type AggregationGroupFactory func() AggregationGroup
type AvgAggregationGroup ¶
type AvgAggregationGroup struct {
// contains filtered or unexported fields
}
func (*AvgAggregationGroup) AccumulateSeries ¶
func (g *AvgAggregationGroup) AccumulateSeries(data types.InstantVectorSeriesData, timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker, emitAnnotationFunc functions.EmitAnnotationFunc) error
func (*AvgAggregationGroup) ComputeOutputSeries ¶
func (g *AvgAggregationGroup) ComputeOutputSeries(timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker) (types.InstantVectorSeriesData, bool, error)
type CountGroupAggregationGroup ¶
type CountGroupAggregationGroup struct {
// contains filtered or unexported fields
}
func NewCountGroupAggregationGroup ¶
func NewCountGroupAggregationGroup(count bool) *CountGroupAggregationGroup
count represents whether this aggregation is `count` (true), or `group` (false)
func (*CountGroupAggregationGroup) AccumulateSeries ¶
func (g *CountGroupAggregationGroup) AccumulateSeries(data types.InstantVectorSeriesData, timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker, _ functions.EmitAnnotationFunc) error
func (*CountGroupAggregationGroup) ComputeOutputSeries ¶
func (g *CountGroupAggregationGroup) ComputeOutputSeries(timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker) (types.InstantVectorSeriesData, bool, error)
type MinMaxAggregationGroup ¶
type MinMaxAggregationGroup struct {
// contains filtered or unexported fields
}
func NewMinMaxAggregationGroup ¶
func NewMinMaxAggregationGroup(max bool) *MinMaxAggregationGroup
max represents whether this aggregation is `max` (true), or `min` (false)
func (*MinMaxAggregationGroup) AccumulateSeries ¶
func (g *MinMaxAggregationGroup) AccumulateSeries(data types.InstantVectorSeriesData, timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker, _ functions.EmitAnnotationFunc) error
func (*MinMaxAggregationGroup) ComputeOutputSeries ¶
func (g *MinMaxAggregationGroup) ComputeOutputSeries(timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker) (types.InstantVectorSeriesData, bool, error)
type SumAggregationGroup ¶
type SumAggregationGroup struct {
// contains filtered or unexported fields
}
func (*SumAggregationGroup) AccumulateSeries ¶
func (g *SumAggregationGroup) AccumulateSeries(data types.InstantVectorSeriesData, timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker, emitAnnotationFunc functions.EmitAnnotationFunc) error
func (*SumAggregationGroup) ComputeOutputSeries ¶
func (g *SumAggregationGroup) ComputeOutputSeries(timeRange types.QueryTimeRange, memoryConsumptionTracker *limiting.MemoryConsumptionTracker) (types.InstantVectorSeriesData, bool, error)
Click to show internal directories.
Click to hide internal directories.