Skip to content

Commit 764de8d

Browse files
authored
Mimir query engine: expand TestConcurrentQueries to include testing queries with float samples (#9194)
* Expand TestConcurrentQueries to include testing queries with float samples * Add changelog entry
1 parent 374dfa6 commit 764de8d

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* [CHANGE] Ruler: Removed `-ruler.drain-notification-queue-on-shutdown` option, which is now enabled by default. #9115
3232
* [CHANGE] Querier: allow wrapping errors with context errors only when the former actually correspond to `context.Canceled` and `context.DeadlineExceeded`. #9175
3333
* [FEATURE] Alertmanager: Added `-alertmanager.log-parsing-label-matchers` to control logging when parsing label matchers. This flag is intended to be used with `-alertmanager.utf8-strict-mode-enabled` to validate UTF-8 strict mode is working as intended. The default value is `false`. #9173
34-
* [FEATURE] Querier: add experimental streaming PromQL engine, enabled with `-querier.query-engine=mimir`. #8422 #8430 #8454 #8455 #8360 #8490 #8508 #8577 #8660 #8671 #8677 #8747 #8850 #8872 #8838 #8911 #8909 #8923 #8924 #8925 #8932 #8933 #8934 #8962 #8986 #8993 #8995 #9008 #9017 #9018 #9019 #9120 #9121 #9136 #9139 #9145 #9191
34+
* [FEATURE] Querier: add experimental streaming PromQL engine, enabled with `-querier.query-engine=mimir`. #8422 #8430 #8454 #8455 #8360 #8490 #8508 #8577 #8660 #8671 #8677 #8747 #8850 #8872 #8838 #8911 #8909 #8923 #8924 #8925 #8932 #8933 #8934 #8962 #8986 #8993 #8995 #9008 #9017 #9018 #9019 #9120 #9121 #9136 #9139 #9145 #9191 #9194
3535
* [FEATURE] Experimental Kafka-based ingest storage. #6888 #6894 #6929 #6940 #6951 #6974 #6982 #7029 #7030 #7091 #7142 #7147 #7148 #7153 #7160 #7193 #7349 #7376 #7388 #7391 #7393 #7394 #7402 #7404 #7423 #7424 #7437 #7486 #7503 #7508 #7540 #7621 #7682 #7685 #7694 #7695 #7696 #7697 #7701 #7733 #7734 #7741 #7752 #7838 #7851 #7871 #7877 #7880 #7882 #7887 #7891 #7925 #7955 #7967 #8031 #8063 #8077 #8088 #8135 #8176 #8184 #8194 #8216 #8217 #8222 #8233 #8503 #8542 #8579 #8657 #8686 #8688 #8703 #8706 #8708 #8738 #8750 #8778 #8808 #8809 #8841 #8842 #8845 #8853 #8886 #8988
3636
* What it is:
3737
* When the new ingest storage architecture is enabled, distributors write incoming write requests to a Kafka-compatible backend, and the ingesters asynchronously replay ingested data from Kafka. In this architecture, the write and read path are de-coupled through a Kafka-compatible backend. The write path and Kafka load is a function of the incoming write traffic, the read path load is a function of received queries. Whatever the load on the read path, it doesn't affect the write path.

pkg/streamingpromql/engine_concurrency_test.go

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ func TestConcurrentQueries(t *testing.T) {
3636
native_histogram{group="a", instance="2"} {{schema:5 sum:8 count:7 buckets:[1 5 1]}}+{{schema:5 sum:10 count:7 buckets:[1 2 3 1]}}x9
3737
native_histogram{group="b", instance="1"} {{schema:5 sum:10 count:7 buckets:[1 2 3 1]}}+{{schema:5 sum:8 count:7 buckets:[1 5 1]}}x9
3838
native_histogram{group="b", instance="2"} {{schema:3 sum:4 count:4 buckets:[4]}}
39+
float{group="a", instance="1"} 1+2x9
40+
float{group="a", instance="2"} 3+2.5x9
41+
float{group="b", instance="1"} 1 2 4 2 7 1 2 3 4
42+
float{group="b", instance="2"} 1 9 2 8 11 12 13 14 15
3943
`
4044

4145
startT := timestamp.Time(0)
@@ -61,6 +65,12 @@ func TestConcurrentQueries(t *testing.T) {
6165
end: startT.Add(10 * time.Minute),
6266
step: time.Minute,
6367
},
68+
{
69+
expr: `sum(rate(native_histogram[5m]))`,
70+
start: startT,
71+
end: startT.Add(10 * time.Minute),
72+
step: time.Minute,
73+
},
6474
{
6575
expr: `count_over_time(native_histogram[5m])`,
6676
start: startT,
@@ -79,6 +89,50 @@ func TestConcurrentQueries(t *testing.T) {
7989
end: startT.Add(10 * time.Minute),
8090
step: time.Minute,
8191
},
92+
{
93+
expr: `rate(float[5m])`,
94+
start: startT,
95+
end: startT.Add(10 * time.Minute),
96+
step: time.Minute,
97+
},
98+
{
99+
// Sum of floats into single group
100+
expr: `sum(float)`,
101+
start: startT,
102+
end: startT.Add(10 * time.Minute),
103+
step: time.Minute,
104+
},
105+
{
106+
// Sum of floats into many groups
107+
expr: `sum by (group) (float)`,
108+
start: startT,
109+
end: startT.Add(10 * time.Minute),
110+
step: time.Minute,
111+
},
112+
{
113+
expr: `sum(rate(float[5m]))`,
114+
start: startT,
115+
end: startT.Add(10 * time.Minute),
116+
step: time.Minute,
117+
},
118+
{
119+
expr: `count_over_time(float[5m])`,
120+
start: startT,
121+
end: startT.Add(10 * time.Minute),
122+
step: time.Minute,
123+
},
124+
{
125+
expr: `sum_over_time(float[5m])`,
126+
start: startT,
127+
end: startT.Add(10 * time.Minute),
128+
step: time.Minute,
129+
},
130+
{
131+
expr: `avg_over_time(float[5m])`,
132+
start: startT,
133+
end: startT.Add(10 * time.Minute),
134+
step: time.Minute,
135+
},
82136
}
83137

84138
storage := promqltest.LoadedStorage(t, data)

0 commit comments

Comments
 (0)