@@ -20,6 +20,7 @@ import (
20
20
"github.com/grafana/dskit/services"
21
21
"github.com/grafana/dskit/test"
22
22
"github.com/grafana/dskit/user"
23
+ "github.com/prometheus/common/model"
23
24
"github.com/prometheus/prometheus/model/labels"
24
25
"github.com/prometheus/prometheus/promql"
25
26
"github.com/prometheus/prometheus/storage"
@@ -43,7 +44,7 @@ func BenchmarkQuery(b *testing.B) {
43
44
44
45
opts := streamingpromql .NewTestEngineOpts ()
45
46
prometheusEngine := promql .NewEngine (opts .CommonOpts )
46
- mimirEngine , err := streamingpromql .NewEngine (opts , streamingpromql .NewStaticQueryLimitsProvider (0 ), stats .NewQueryMetrics (nil ), streamingpromql .NewQueryPlanner (opts ), log .NewNopLogger ())
47
+ mimirEngine , err := streamingpromql .NewEngine (opts , streamingpromql .NewStaticQueryLimitsProvider (0 , model . UTF8Validation ), stats .NewQueryMetrics (nil ), streamingpromql .NewQueryPlanner (opts ), log .NewNopLogger ())
47
48
require .NoError (b , err )
48
49
49
50
// Important: the names below must remain in sync with the names used in tools/benchmark-query-engine.
@@ -95,7 +96,7 @@ func TestBothEnginesReturnSameResultsForBenchmarkQueries(t *testing.T) {
95
96
96
97
opts := streamingpromql .NewTestEngineOpts ()
97
98
prometheusEngine := promql .NewEngine (opts .CommonOpts )
98
- limitsProvider := streamingpromql .NewStaticQueryLimitsProvider (0 )
99
+ limitsProvider := streamingpromql .NewStaticQueryLimitsProvider (0 , model . UTF8Validation )
99
100
queryMetrics := stats .NewQueryMetrics (nil )
100
101
mimirEngine , err := streamingpromql .NewEngine (opts , limitsProvider , queryMetrics , streamingpromql .NewQueryPlanner (opts ), log .NewNopLogger ())
101
102
require .NoError (t , err )
@@ -124,7 +125,7 @@ func TestBenchmarkSetup(t *testing.T) {
124
125
q := createBenchmarkQueryable (t , []int {1 })
125
126
126
127
opts := streamingpromql .NewTestEngineOpts ()
127
- mimirEngine , err := streamingpromql .NewEngine (opts , streamingpromql .NewStaticQueryLimitsProvider (0 ), stats .NewQueryMetrics (nil ), streamingpromql .NewQueryPlanner (opts ), log .NewNopLogger ())
128
+ mimirEngine , err := streamingpromql .NewEngine (opts , streamingpromql .NewStaticQueryLimitsProvider (0 , model . UTF8Validation ), stats .NewQueryMetrics (nil ), streamingpromql .NewQueryPlanner (opts ), log .NewNopLogger ())
128
129
require .NoError (t , err )
129
130
130
131
ctx := user .InjectOrgID (context .Background (), UserID )
0 commit comments