MCPcopy
hub / github.com/prometheus/prometheus / testEngine

Function testEngine

web/api/v1/api_test.go:71–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69var testParser = parser.NewParser(parser.Options{})
70
71func testEngine(t *testing.T) *promql.Engine {
72 t.Helper()
73 return promqltest.NewTestEngineWithOpts(t, promql.EngineOpts{
74 Logger: nil,
75 Reg: nil,
76 MaxSamples: 10000,
77 Timeout: 100 * time.Second,
78 NoStepSubqueryIntervalFn: func(int64) int64 { return 60 * 1000 },
79 EnableAtModifier: true,
80 EnableNegativeOffset: true,
81 EnablePerStepStats: true,
82 })
83}
84
85// testMetaStore satisfies the scrape.MetricMetadataStore interface.
86// It is used to inject specific metadata as part of a test case.

Callers 3

TestEndpointsFunction · 0.70
TestQueryExemplarsFunction · 0.70
TestStatsFunction · 0.70

Calls 1

NewTestEngineWithOptsFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…