mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
working commit
This commit is contained in:
parent
07f178a4be
commit
fbeaec447f
|
@ -198,11 +198,12 @@ type VectorSelector struct {
|
||||||
// Offset is the offset used during the query execution
|
// Offset is the offset used during the query execution
|
||||||
// which is calculated using the original offset, at modifier time,
|
// which is calculated using the original offset, at modifier time,
|
||||||
// eval time, and subquery offsets in the AST tree.
|
// eval time, and subquery offsets in the AST tree.
|
||||||
|
SkipHistogramBuckets bool // Set when decoding native histogram buckets is not needed for query evaluation.
|
||||||
Offset time.Duration
|
Offset time.Duration
|
||||||
Timestamp *int64
|
Timestamp *int64
|
||||||
SkipHistogramBuckets bool // Set when decoding native histogram buckets is not needed for query evaluation.
|
|
||||||
StartOrEnd ItemType // Set when @ is used with start() or end()
|
StartOrEnd ItemType // Set when @ is used with start() or end()
|
||||||
LabelMatchers []*labels.Matcher
|
LabelMatchers []*labels.Matcher
|
||||||
|
LookbackDelta time.Duration
|
||||||
|
|
||||||
// The unexpanded seriesSet populated at query preparation time.
|
// The unexpanded seriesSet populated at query preparation time.
|
||||||
UnexpandedSeriesSet storage.SeriesSet
|
UnexpandedSeriesSet storage.SeriesSet
|
||||||
|
@ -215,6 +216,14 @@ type VectorSelector struct {
|
||||||
PosRange posrange.PositionRange
|
PosRange posrange.PositionRange
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *VectorSelector) GetLookbackDelta(d time.Duration) time.Duration {
|
||||||
|
if m.LookbackDelta > 0 {
|
||||||
|
return m.LookbackDelta
|
||||||
|
}
|
||||||
|
|
||||||
|
return d
|
||||||
|
}
|
||||||
|
|
||||||
// TestStmt is an internal helper statement that allows execution
|
// TestStmt is an internal helper statement that allows execution
|
||||||
// of an arbitrary function during handling. It is used to test the Engine.
|
// of an arbitrary function during handling. It is used to test the Engine.
|
||||||
type TestStmt func(context.Context) error
|
type TestStmt func(context.Context) error
|
||||||
|
|
Loading…
Reference in a new issue