Documentation ¶
Index ¶
- func DeepClone(original map[parser.MetricRequest][]*types.MetricData) map[parser.MetricRequest][]*types.MetricData
- func DeepEqual(t *testing.T, target string, ...)
- func EvaluatorFromFunc(function interfaces.Function) interfaces.Evaluator
- func EvaluatorFromFuncWithMetadata(metadata map[string]interfaces.Function) interfaces.Evaluator
- func InitTestSummarize() (int32, int32, int32)
- func NearlyEqual(a []float64, absent []bool, b []float64) bool
- func NearlyEqualMetrics(a, b *types.MetricData) bool
- func NoopGetTargetData(ctx context.Context, exp parser.Expr, from, until int32, ...) (error, int)
- func TestEvalExpr(t *testing.T, tt *EvalTestItem)
- func TestMultiReturnEvalExpr(t *testing.T, tt *MultiReturnEvalTestItem)
- func TestSummarizeEvalExpr(t *testing.T, tt *SummarizeEvalTestItem)
- type EvalTestItem
- type FuncEvaluator
- type MultiReturnEvalTestItem
- type SummarizeEvalTestItem
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)
func EvaluatorFromFunc ¶
func EvaluatorFromFunc(function interfaces.Function) interfaces.Evaluator
func EvaluatorFromFuncWithMetadata ¶
func EvaluatorFromFuncWithMetadata(metadata map[string]interfaces.Function) interfaces.Evaluator
func InitTestSummarize ¶
func NearlyEqualMetrics ¶
func NearlyEqualMetrics(a, b *types.MetricData) bool
func NoopGetTargetData ¶ added in v0.2.0
func TestEvalExpr ¶
func TestEvalExpr(t *testing.T, tt *EvalTestItem)
func TestMultiReturnEvalExpr ¶
func TestMultiReturnEvalExpr(t *testing.T, tt *MultiReturnEvalTestItem)
func TestSummarizeEvalExpr ¶
func TestSummarizeEvalExpr(t *testing.T, tt *SummarizeEvalTestItem)
Types ¶
type EvalTestItem ¶
type EvalTestItem struct { //E parser.Expr Target string M map[parser.MetricRequest][]*types.MetricData Want []*types.MetricData }
type FuncEvaluator ¶
type FuncEvaluator struct {
// contains filtered or unexported fields
}
func (*FuncEvaluator) EvalExpr ¶
func (evaluator *FuncEvaluator) EvalExpr(ctx context.Context, e parser.Expr, from, until int32, values map[parser.MetricRequest][]*types.MetricData, getTargetData interfaces.GetTargetData) ([]*types.MetricData, error)
type MultiReturnEvalTestItem ¶
type MultiReturnEvalTestItem struct { Target string M map[parser.MetricRequest][]*types.MetricData Name string Results map[string][]*types.MetricData }
type SummarizeEvalTestItem ¶
type SummarizeEvalTestItem struct { Target string M map[parser.MetricRequest][]*types.MetricData W []float64 Name string Step int32 Start int32 Stop int32 }
Click to show internal directories.
Click to hide internal directories.