Documentation
¶
Index ¶
- type Series
- type StepVector
- func (s *StepVector) AppendHistogram(histogramID uint64, h *histogram.FloatHistogram)
- func (s *StepVector) AppendHistogramWithSizeHint(histogramID uint64, h *histogram.FloatHistogram, hint int)
- func (s *StepVector) AppendHistograms(histogramIDs []uint64, hs []*histogram.FloatHistogram)
- func (s *StepVector) AppendSample(id uint64, val float64)
- func (s *StepVector) AppendSampleWithSizeHint(id uint64, val float64, hint int)
- func (s *StepVector) AppendSamples(ids []uint64, vals []float64)
- func (s *StepVector) RemoveHistogram(index int)
- func (s *StepVector) RemoveSample(index int)
- func (s *StepVector) Reset(t int64)
- type VectorOperator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StepVector ¶
type StepVector struct {
T int64
SampleIDs []uint64
Samples []float64
HistogramIDs []uint64
Histograms []*histogram.FloatHistogram
}
func (*StepVector) AppendHistogram ¶
func (s *StepVector) AppendHistogram(histogramID uint64, h *histogram.FloatHistogram)
func (*StepVector) AppendHistogramWithSizeHint ¶ added in v0.5.0
func (s *StepVector) AppendHistogramWithSizeHint(histogramID uint64, h *histogram.FloatHistogram, hint int)
AppendHistogramWithSizeHint appends a histogram and lazily pre-allocates capacity if needed. Use this when you know the expected number of histograms to avoid repeated slice growth.
func (*StepVector) AppendHistograms ¶
func (s *StepVector) AppendHistograms(histogramIDs []uint64, hs []*histogram.FloatHistogram)
func (*StepVector) AppendSample ¶
func (s *StepVector) AppendSample(id uint64, val float64)
func (*StepVector) AppendSampleWithSizeHint ¶ added in v0.5.0
func (s *StepVector) AppendSampleWithSizeHint(id uint64, val float64, hint int)
AppendSampleWithSizeHint appends a sample and lazily pre-allocates capacity if needed. Use this when you know the expected number of samples to avoid repeated slice growth.
func (*StepVector) AppendSamples ¶
func (s *StepVector) AppendSamples(ids []uint64, vals []float64)
func (*StepVector) RemoveHistogram ¶
func (s *StepVector) RemoveHistogram(index int)
func (*StepVector) RemoveSample ¶
func (s *StepVector) RemoveSample(index int)
func (*StepVector) Reset ¶ added in v0.5.0
func (s *StepVector) Reset(t int64)
Reset resets the StepVector to the given timestamp while preserving slice capacity.
type VectorOperator ¶
type VectorOperator interface {
// Next yields vectors of samples from all series for one or more execution steps.
// The caller provides a buffer (buf) to be filled with StepVectors.
// Returns the number of StepVectors written to buf and any error encountered.
// A return value of 0 indicates no more data is available.
Next(ctx context.Context, buf []StepVector) (int, error)
// Series returns all series that the operator will process during Next results.
// The result can be used by upstream operators to allocate output tables and buffers
// before starting to process samples.
Series(ctx context.Context) ([]labels.Labels, error)
// Explain returns human-readable explanation of the current operator and optional nested operators.
Explain() (next []VectorOperator)
fmt.Stringer
}
VectorOperator performs operations on series in step by step fashion.
Click to show internal directories.
Click to hide internal directories.