@@ -1964,9 +1964,22 @@ sum by (grpc_method, grpc_code) (
1964
1964
end : time .Unix (3000 , 0 ),
1965
1965
step : 2 * time .Second ,
1966
1966
},
1967
+ {
1968
+ name : "limitK by (series)" ,
1969
+ load : `load 30s
1970
+ http_requests_total{pod="nginx-1", series="1"} 1+1.1x50
1971
+ http_requests_total{pod="nginx-2", series="1"} 2+2.3x50
1972
+ http_requests_total{pod="nginx-4", series="2"} 5+2.4x50
1973
+ http_requests_total{pod="nginx-5", series="2"} 8.4+2.3x50
1974
+ http_requests_total{pod="nginx-6", series="2"} 2.3+2.3x50` ,
1975
+ query : `limitk(2, http_requests_total) by (pod)` ,
1976
+ start : time .Unix (0 , 0 ),
1977
+ end : time .Unix (3000 , 0 ),
1978
+ step : 2 * time .Second ,
1979
+ },
1967
1980
// TODO(Saumya40-Codes): uncomment once https://github.com/prometheus/prometheus/pull/16404 gets merged
1968
1981
// {
1969
- // name: "limitK but a sample not present at last few timestamps",
1982
+ // name: "limitK but a sample might not present at last few timestamps",
1970
1983
// load: `load 30s
1971
1984
// http_requests_total{pod="nginx-1", series="1"} 1+1.1x50
1972
1985
// http_requests_total{pod="nginx-2", series="1"} 2+2.3x40
@@ -1978,19 +1991,6 @@ sum by (grpc_method, grpc_code) (
1978
1991
// end: time.Unix(3000, 0),
1979
1992
// step: 2 * time.Second,
1980
1993
// },
1981
- // {
1982
- // name: "limitK by (pod)",
1983
- // load: `load 30s
1984
- // http_requests_total{pod="nginx-1", series="1"} 1+1.1x50
1985
- // http_requests_total{pod="nginx-2", series="1"} 2+2.3x40
1986
- // http_requests_total{pod="nginx-4", series="2"} 5+2.4x50
1987
- // http_requests_total{pod="nginx-5", series="2"} 8.4+2.3x50
1988
- // http_requests_total{pod="nginx-6", series="2"} 2.3+2.3x50`,
1989
- // query: `limitk(2, http_requests_total) by (pod)`,
1990
- // start: time.Unix(0, 0),
1991
- // end: time.Unix(3000, 0),
1992
- // step: 2 * time.Second,
1993
- // },
1994
1994
{
1995
1995
name : "sgn" ,
1996
1996
load : `load 30s
@@ -3616,6 +3616,19 @@ min without () (
3616
3616
http_requests_total{pod="nginx-3", series="2"} 1` ,
3617
3617
query : "limitk(2, http_requests_total) by (pod)" ,
3618
3618
},
3619
+ {
3620
+ name : "limitk(x, many-to-many join)" ,
3621
+ load : `load 30s
3622
+ http_requests_total{pod="nginx-1", series="2"} 89
3623
+ http_requests_total{pod="nginx-1", series="1"} 49
3624
+ http_requests_total{pod="nginx-1", series="3"} 19
3625
+ http_requests_total{pod="nginx-2", series="2"} 12
3626
+ http_requests_total{pod="nginx-2", series="1"} 24
3627
+ http_requests_total{pod="nginx-3", series="3"} 8
3628
+ http_requests_total{pod="nginx-3", series="1"} 22
3629
+ http_requests_total{pod="nginx-3", series="2"} 1` ,
3630
+ query : "limitk(2, http_requests_total or limitk(2, sum without (series) (http_requests_total))) by (pod)" ,
3631
+ },
3619
3632
{
3620
3633
name : "max" ,
3621
3634
load : `load 30s
0 commit comments