Documentation ¶
Overview ¶
Package dfiter efficiently creates dataframes used in regression detection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInsufficientData = errors.New("insufficient data")
ErrInsufficientData is returned by the DataFrameIterator if all the queries compeleted successfully, but there wasn't enough data to continue.
Functions ¶
This section is empty.
Types ¶
type DataFrameIterator ¶
type DataFrameIterator interface { Next() bool Value(ctx context.Context) (*dataframe.DataFrame, error) }
DataFrameIterator is an iterator that produces DataFrames.
for it.Next() { df, err := it.Value(ctx) // Do something with df. }
func NewDataFrameIterator ¶
func NewDataFrameIterator( ctx context.Context, progress progress.Progress, dfBuilder dataframe.DataFrameBuilder, perfGit perfgit.Git, regressionStateCallback types.ProgressCallback, queryAsString string, domain types.Domain, alert *alerts.Alert, anomalyConfig config.AnomalyConfig, ) (DataFrameIterator, error)
NewDataFrameIterator returns a DataFrameIterator that produces a set of dataframes for the given query, domain, and alert.
If domain.Offset is non-zero then we want the iterator to return a single dataframe of alert.Radius around the specified commit. Otherwise it returns a series of dataframes of size 2*alert.Radius+1 sliced from a single dataframe of size domain.N.
Click to show internal directories.
Click to hide internal directories.