lib

package
v0.0.0-...-250ed9d Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observation

type Observation struct {
	MetricFingerprint uint64
	MetricName        string
	Value             float64
	Timestamp         time.Time
}

type ObservationResult

type ObservationResult struct {
	Buffers              [][]float64
	Err                  error
	CurrentStrideStartTs time.Time
	CurrentStrideMaxTs   time.Time
}

type TimeseriesAccumulator

type TimeseriesAccumulator struct {

	// The ids of the timeseries, in order.
	// A tsid is a json serialization of the metric name and the labels.
	// invariant: rowmap[Tsids[i]] == i for 0 <= i <= maxRow
	Tsids []TsId
	// contains filtered or unexported fields
}

func NewTimeseriesAccumulator

func NewTimeseriesAccumulator(stride int, startTime time.Time, sampleInterval int,
	maxRows int,
	bc chan<- *ObservationResult) *TimeseriesAccumulator

func (*TimeseriesAccumulator) AddObservation

func (a *TimeseriesAccumulator) AddObservation(observation *Observation)

type TimeseriesWindow

type TimeseriesWindow struct {
	ConstantRows []bool

	// This is the number of strides that have been shifted into this window.
	StrideCounter int
	// contains filtered or unexported fields
}

A TimeseriesWindow is a sliding window over a list of timeseries.

func NewTimeseriesWindow

func NewTimeseriesWindow(settings settings.CorrjoinSettings, comparer comparisons.Engine) *TimeseriesWindow

func (*TimeseriesWindow) ShiftBuffer

func (w *TimeseriesWindow) ShiftBuffer(buffer [][]float64) (error, bool)

shift _buffer_ into _w_ from the right, displacing the first buffer.width columns of w. Returns true if computation was performed, false if there was nothing to do.

type TsId

type TsId struct {
	MetricFingerprint uint64
	MetricName        string
}

type WindowIsBusyError

type WindowIsBusyError struct{}

func (WindowIsBusyError) Error

func (w WindowIsBusyError) Error() string

Directories

Path Synopsis
Package comparisons contains different execution engines for pairwise comparison of timeseries.
Package comparisons contains different execution engines for pairwise comparison of timeseries.
Package settings contains all the parameters for the corrjoin algorithm.
Package settings contains all the parameters for the corrjoin algorithm.
Package utils has general utilities.
Package utils has general utilities.

Jump to

Keyboard shortcuts

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