@ -144,7 +144,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
} ,
} ,
@ -154,7 +154,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
} ,
} ,
@ -263,13 +263,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching { Card : CardOneToOne } ,
VectorMatching : & VectorMatching { Card : CardOneToOne } ,
@ -281,7 +281,7 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & NumberLiteral { 1 } ,
RHS : & NumberLiteral { 1 } ,
@ -293,7 +293,7 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & NumberLiteral { 1 } ,
RHS : & NumberLiteral { 1 } ,
@ -307,7 +307,7 @@ var testExpr = []struct {
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
} ,
} ,
@ -318,13 +318,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
@ -336,13 +336,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
@ -354,13 +354,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
@ -375,13 +375,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching { Card : CardOneToOne } ,
VectorMatching : & VectorMatching { Card : CardOneToOne } ,
@ -391,13 +391,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "bla" ,
Name : "bla" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bla" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bla" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "blub" ,
Name : "blub" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "blub" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "blub" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
@ -416,13 +416,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
@ -430,7 +430,7 @@ var testExpr = []struct {
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "baz" ,
Name : "baz" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "baz" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "baz" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
@ -438,7 +438,7 @@ var testExpr = []struct {
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "qux" ,
Name : "qux" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "qux" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "qux" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
VectorMatching : & VectorMatching { Card : CardManyToMany } ,
@ -451,7 +451,7 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
RHS : & BinaryExpr {
RHS : & BinaryExpr {
@ -459,13 +459,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "bla" ,
Name : "bla" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bla" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bla" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "blub" ,
Name : "blub" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "blub" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "blub" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -488,13 +488,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -510,13 +510,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -532,13 +532,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -554,13 +554,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -576,13 +576,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -597,13 +597,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -618,13 +618,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "baz" ,
Name : "baz" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "baz" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "baz" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -640,13 +640,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -663,13 +663,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -685,13 +685,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -707,13 +707,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -730,13 +730,13 @@ var testExpr = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & VectorSelector {
RHS : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
VectorMatching : & VectorMatching {
VectorMatching : & VectorMatching {
@ -825,7 +825,7 @@ var testExpr = []struct {
Name : "foo" ,
Name : "foo" ,
Offset : 0 ,
Offset : 0 ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -834,7 +834,7 @@ var testExpr = []struct {
Name : "foo" ,
Name : "foo" ,
Offset : 5 * time . Minute ,
Offset : 5 * time . Minute ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -843,8 +843,8 @@ var testExpr = []struct {
Name : "foo:bar" ,
Name : "foo:bar" ,
Offset : 0 ,
Offset : 0 ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : "a" , Value : "bc" } ,
mustLabelMatcher ( metric . Equal , "a" , "bc" ) ,
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo:bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo:bar" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -853,8 +853,8 @@ var testExpr = []struct {
Name : "foo" ,
Name : "foo" ,
Offset : 0 ,
Offset : 0 ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : "NaN" , Value : "bc" } ,
mustLabelMatcher ( metric . Equal , "NaN" , "bc" ) ,
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -863,11 +863,11 @@ var testExpr = []struct {
Name : "foo" ,
Name : "foo" ,
Offset : 0 ,
Offset : 0 ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : "a" , Value : "b" } ,
mustLabelMatcher ( metric . Equal , "a" , "b" ) ,
{ Type : metric . NotEqual , Name : "foo" , Value : "bar" } ,
mustLabelMatcher ( metric . NotEqual , "foo" , "bar" ) ,
mustLabelMatcher ( metric . RegexMatch , "test" , "test" ) ,
mustLabelMatcher ( metric . RegexMatch , "test" , "test" ) ,
mustLabelMatcher ( metric . RegexNoMatch , "bar" , "baz" ) ,
mustLabelMatcher ( metric . RegexNoMatch , "bar" , "baz" ) ,
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -949,7 +949,7 @@ var testExpr = []struct {
Offset : 0 ,
Offset : 0 ,
Range : 5 * time . Second ,
Range : 5 * time . Second ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "test" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "test" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -959,7 +959,7 @@ var testExpr = []struct {
Offset : 0 ,
Offset : 0 ,
Range : 5 * time . Minute ,
Range : 5 * time . Minute ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "test" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "test" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -969,7 +969,7 @@ var testExpr = []struct {
Offset : 5 * time . Minute ,
Offset : 5 * time . Minute ,
Range : 5 * time . Hour ,
Range : 5 * time . Hour ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "test" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "test" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -979,7 +979,7 @@ var testExpr = []struct {
Offset : 10 * time . Second ,
Offset : 10 * time . Second ,
Range : 5 * 24 * time . Hour ,
Range : 5 * 24 * time . Hour ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "test" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "test" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -989,7 +989,7 @@ var testExpr = []struct {
Offset : 14 * 24 * time . Hour ,
Offset : 14 * 24 * time . Hour ,
Range : 5 * 7 * 24 * time . Hour ,
Range : 5 * 7 * 24 * time . Hour ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "test" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "test" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -999,8 +999,8 @@ var testExpr = []struct {
Offset : 3 * 24 * time . Hour ,
Offset : 3 * 24 * time . Hour ,
Range : 5 * 365 * 24 * time . Hour ,
Range : 5 * 365 * 24 * time . Hour ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : "a" , Value : "b" } ,
mustLabelMatcher ( metric . Equal , "a" , "b" ) ,
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "test" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "test" ) ,
} ,
} ,
} ,
} ,
} , {
} , {
@ -1059,7 +1059,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" } ,
Grouping : model . LabelNames { "foo" } ,
@ -1072,7 +1072,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" } ,
Grouping : model . LabelNames { "foo" } ,
@ -1085,7 +1085,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" , "bar" } ,
Grouping : model . LabelNames { "foo" , "bar" } ,
@ -1097,7 +1097,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" } ,
Grouping : model . LabelNames { "foo" } ,
@ -1109,7 +1109,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" } ,
Grouping : model . LabelNames { "foo" } ,
@ -1122,7 +1122,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" } ,
Grouping : model . LabelNames { "foo" } ,
@ -1135,7 +1135,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" } ,
Grouping : model . LabelNames { "foo" } ,
@ -1148,7 +1148,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" } ,
Grouping : model . LabelNames { "foo" } ,
@ -1161,7 +1161,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" } ,
Grouping : model . LabelNames { "foo" } ,
@ -1173,7 +1173,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
} ,
} ,
@ -1184,7 +1184,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { "foo" } ,
Grouping : model . LabelNames { "foo" } ,
@ -1196,7 +1196,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Grouping : model . LabelNames { } ,
Grouping : model . LabelNames { } ,
@ -1208,7 +1208,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Param : & NumberLiteral { 5 } ,
Param : & NumberLiteral { 5 } ,
@ -1220,7 +1220,7 @@ var testExpr = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
Param : & StringLiteral { "value" } ,
Param : & StringLiteral { "value" } ,
@ -1288,8 +1288,8 @@ var testExpr = []struct {
& VectorSelector {
& VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . NotEqual , Name : "foo" , Value : "bar" } ,
mustLabelMatcher ( metric . NotEqual , "foo" , "bar" ) ,
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
} ,
} ,
@ -1302,7 +1302,7 @@ var testExpr = []struct {
& MatrixSelector {
& MatrixSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
Range : 5 * time . Minute ,
Range : 5 * time . Minute ,
} ,
} ,
@ -1316,7 +1316,7 @@ var testExpr = []struct {
& VectorSelector {
& VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
} ,
} ,
@ -1329,7 +1329,7 @@ var testExpr = []struct {
& VectorSelector {
& VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
& NumberLiteral { 5 } ,
& NumberLiteral { 5 } ,
@ -1537,7 +1537,7 @@ var testStatement = []struct {
& MatrixSelector {
& MatrixSelector {
Name : "http_request_count" ,
Name : "http_request_count" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "http_request_count" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "http_request_count" ) ,
} ,
} ,
Range : 5 * time . Minute ,
Range : 5 * time . Minute ,
} ,
} ,
@ -1553,7 +1553,7 @@ var testStatement = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "dc:http_request:rate5m" ,
Name : "dc:http_request:rate5m" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "dc:http_request:rate5m" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "dc:http_request:rate5m" ) ,
} ,
} ,
} ,
} ,
RHS : & NumberLiteral { 10000 } ,
RHS : & NumberLiteral { 10000 } ,
@ -1570,8 +1570,8 @@ var testStatement = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : "label1" , Value : "value1" } ,
mustLabelMatcher ( metric . Equal , "label1" , "value1" ) ,
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
Labels : nil ,
Labels : nil ,
@ -1583,7 +1583,7 @@ var testStatement = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "foo" ,
Name : "foo" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "foo" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "foo" ) ,
} ,
} ,
} ,
} ,
RHS : & NumberLiteral { 10 } ,
RHS : & NumberLiteral { 10 } ,
@ -1604,9 +1604,9 @@ var testStatement = []struct {
Expr : & VectorSelector {
Expr : & VectorSelector {
Name : "bar" ,
Name : "bar" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : "a" , Value : "b" } ,
mustLabelMatcher ( metric . Equal , "a" , "b" ) ,
mustLabelMatcher ( metric . RegexMatch , "x" , "y" ) ,
mustLabelMatcher ( metric . RegexMatch , "x" , "y" ) ,
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "bar" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "bar" ) ,
} ,
} ,
} ,
} ,
Labels : model . LabelSet { "x" : "" , "a" : "z" } ,
Labels : model . LabelSet { "x" : "" , "a" : "z" } ,
@ -1628,7 +1628,7 @@ var testStatement = []struct {
LHS : & VectorSelector {
LHS : & VectorSelector {
Name : "some_metric" ,
Name : "some_metric" ,
LabelMatchers : metric . LabelMatchers {
LabelMatchers : metric . LabelMatchers {
{ Type : metric . Equal , Name : model . MetricNameLabel , Value : "some_metric" } ,
mustLabelMatcher ( metric . Equal , model . MetricNameLabel , "some_metric" ) ,
} ,
} ,
} ,
} ,
RHS : & NumberLiteral { 1 } ,
RHS : & NumberLiteral { 1 } ,