Documentation ¶
Index ¶
- func DeepClone(original map[parser.MetricRequest][]*types.MetricData) map[parser.MetricRequest][]*types.MetricData
- func DeepEqual(t *testing.T, target string, ...)
- func DummyEvaluator() interfaces.Evaluator
- func EvaluatorFromFunc(function interfaces.Function) interfaces.Evaluator
- func EvaluatorFromFuncWithMetadata(metadata map[string]interfaces.Function) interfaces.Evaluator
- func GenerateValues(start, stop, step int64) (values []float64)
- func InitTestSummarize() (int64, int64, int64)
- func TestEvalExpr(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem)
- func TestEvalExprModifiedOrigin(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem, from, until int64, ...) error
- func TestEvalExprOrdered(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem)
- func TestEvalExprResult(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem)
- func TestEvalExprWithCustomValidation(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItemWithCustomValidation)
- func TestEvalExprWithError(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItemWithError)
- func TestEvalExprWithOptions(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem, compareTags bool)
- func TestEvalExprWithRange(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItemWithRange)
- func TestMultiReturnEvalExpr(t *testing.T, eval interfaces.Evaluator, tt *MultiReturnEvalTestItem)
- func TestRewriteExpr(t *testing.T, eval interfaces.Evaluator, tt *RewriteTestItem)
- func TestSummarizeEvalExpr(t *testing.T, eval interfaces.Evaluator, tt *SummarizeEvalTestItem)
- type EvalTestItem
- type EvalTestItemWithCustomValidation
- type EvalTestItemWithError
- type EvalTestItemWithRange
- type FuncEvaluator
- type MultiReturnEvalTestItem
- type RewriteTestError
- type RewriteTestItem
- type RewriteTestResult
- type SummarizeEvalTestItem
- type TestZipper
- func (zp TestZipper) Find(ctx context.Context, request pb.MultiGlobRequest) (*pb.MultiGlobResponse, *zipperTypes.Stats, merry.Error)
- func (zp TestZipper) Info(ctx context.Context, metrics []string) (*pb.ZipperInfoResponse, *zipperTypes.Stats, merry.Error)
- func (zp TestZipper) Render(ctx context.Context, request pb.MultiFetchRequest) ([]*types.MetricData, *zipperTypes.Stats, merry.Error)
- func (zp TestZipper) RenderCompat(ctx context.Context, metrics []string, from, until int64) ([]*types.MetricData, *zipperTypes.Stats, merry.Error)
- func (zp TestZipper) ScaleToCommonStep() bool
- func (zp TestZipper) TagNames(ctx context.Context, query string, limit int64) ([]string, merry.Error)
- func (zp TestZipper) TagValues(ctx context.Context, query string, limit int64) ([]string, merry.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepClone ¶
func DeepClone(original map[parser.MetricRequest][]*types.MetricData) map[parser.MetricRequest][]*types.MetricData
func DeepEqual ¶
func DeepEqual(t *testing.T, target string, original, modified map[parser.MetricRequest][]*types.MetricData, compareTags bool)
func DummyEvaluator ¶ added in v0.13.0
func DummyEvaluator() interfaces.Evaluator
func EvaluatorFromFunc ¶
func EvaluatorFromFunc(function interfaces.Function) interfaces.Evaluator
func EvaluatorFromFuncWithMetadata ¶
func EvaluatorFromFuncWithMetadata(metadata map[string]interfaces.Function) interfaces.Evaluator
func GenerateValues ¶ added in v0.17.0
func InitTestSummarize ¶
func TestEvalExpr ¶
func TestEvalExpr(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem)
func TestEvalExprModifiedOrigin ¶ added in v0.14.1
func TestEvalExprModifiedOrigin(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem, from, until int64, strictOrder, compareTags bool) error
func TestEvalExprOrdered ¶ added in v0.15.3
func TestEvalExprOrdered(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem)
func TestEvalExprResult ¶ added in v0.16.0
func TestEvalExprResult(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem)
func TestEvalExprWithCustomValidation ¶ added in v0.16.0
func TestEvalExprWithCustomValidation(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItemWithCustomValidation)
func TestEvalExprWithError ¶ added in v0.15.3
func TestEvalExprWithError(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItemWithError)
func TestEvalExprWithOptions ¶ added in v0.16.0
func TestEvalExprWithOptions(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItem, compareTags bool)
func TestEvalExprWithRange ¶ added in v0.15.5
func TestEvalExprWithRange(t *testing.T, eval interfaces.Evaluator, tt *EvalTestItemWithRange)
func TestMultiReturnEvalExpr ¶
func TestMultiReturnEvalExpr(t *testing.T, eval interfaces.Evaluator, tt *MultiReturnEvalTestItem)
func TestRewriteExpr ¶ added in v0.13.0
func TestRewriteExpr(t *testing.T, eval interfaces.Evaluator, tt *RewriteTestItem)
func TestSummarizeEvalExpr ¶
func TestSummarizeEvalExpr(t *testing.T, eval interfaces.Evaluator, tt *SummarizeEvalTestItem)
Types ¶
type EvalTestItem ¶
type EvalTestItem struct { //E parser.Expr Target string M map[parser.MetricRequest][]*types.MetricData Want []*types.MetricData }
type EvalTestItemWithCustomValidation ¶ added in v0.16.0
type EvalTestItemWithCustomValidation struct { Target string M map[parser.MetricRequest][]*types.MetricData Validator func(*testing.T, []*types.MetricData) From int64 Until int64 }
type EvalTestItemWithError ¶ added in v0.15.3
type EvalTestItemWithError struct { Target string M map[parser.MetricRequest][]*types.MetricData Want []*types.MetricData Error error }
type EvalTestItemWithRange ¶ added in v0.15.5
type EvalTestItemWithRange struct { Target string M map[parser.MetricRequest][]*types.MetricData Want []*types.MetricData From int64 Until int64 }
func (*EvalTestItemWithRange) TestItem ¶ added in v0.15.5
func (r *EvalTestItemWithRange) TestItem() *EvalTestItem
type FuncEvaluator ¶
type FuncEvaluator struct {
// contains filtered or unexported fields
}
func (*FuncEvaluator) Eval ¶ added in v0.13.0
func (evaluator *FuncEvaluator) Eval(ctx context.Context, e parser.Expr, from, until int64, values map[parser.MetricRequest][]*types.MetricData) ([]*types.MetricData, error)
func (*FuncEvaluator) Fetch ¶ added in v0.16.1
func (evaluator *FuncEvaluator) Fetch(_ context.Context, _ []parser.Expr, _, _ int64, values map[parser.MetricRequest][]*types.MetricData) (map[parser.MetricRequest][]*types.MetricData, error)
type MultiReturnEvalTestItem ¶
type MultiReturnEvalTestItem struct { Target string M map[parser.MetricRequest][]*types.MetricData Name string Results map[string][]*types.MetricData }
type RewriteTestError ¶ added in v0.16.1
type RewriteTestError struct { //E parser.Expr Target string M map[parser.MetricRequest][]*types.MetricData Want error }
type RewriteTestItem ¶ added in v0.13.0
type RewriteTestItem struct { //E parser.Expr Target string M map[parser.MetricRequest][]*types.MetricData Want RewriteTestResult }
type RewriteTestResult ¶ added in v0.13.0
type SummarizeEvalTestItem ¶
type TestZipper ¶ added in v0.17.0
type TestZipper struct {
M map[parser.MetricRequest][]*types.MetricData
}
func NewTestZipper ¶ added in v0.17.0
func NewTestZipper(m map[parser.MetricRequest][]*types.MetricData) TestZipper
func (TestZipper) Find ¶ added in v0.17.0
func (zp TestZipper) Find(ctx context.Context, request pb.MultiGlobRequest) (*pb.MultiGlobResponse, *zipperTypes.Stats, merry.Error)
func (TestZipper) Info ¶ added in v0.17.0
func (zp TestZipper) Info(ctx context.Context, metrics []string) (*pb.ZipperInfoResponse, *zipperTypes.Stats, merry.Error)
func (TestZipper) Render ¶ added in v0.17.0
func (zp TestZipper) Render(ctx context.Context, request pb.MultiFetchRequest) ([]*types.MetricData, *zipperTypes.Stats, merry.Error)
func (TestZipper) RenderCompat ¶ added in v0.17.0
func (zp TestZipper) RenderCompat(ctx context.Context, metrics []string, from, until int64) ([]*types.MetricData, *zipperTypes.Stats, merry.Error)
func (TestZipper) ScaleToCommonStep ¶ added in v0.17.0
func (zp TestZipper) ScaleToCommonStep() bool
Click to show internal directories.
Click to hide internal directories.