Skip to content

Commit

Permalink
Rename defaultEngine to rawEngine
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Kononov <krya-kryak@users.noreply.github.com>
  • Loading branch information
krya-kryak committed Oct 8, 2020
1 parent b491083 commit 29ea24e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/thanos/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,17 +557,17 @@ func engineFunc(newEngine func(time.Duration) *promql.Engine, lookbackDelta time
deltas = []int64{downsample.ResLevel0, downsample.ResLevel1, downsample.ResLevel2}
}
var (
engines = make([]*promql.Engine, len(deltas))
defaultEngine = newEngine(lookbackDelta)
ld = lookbackDelta.Milliseconds()
engines = make([]*promql.Engine, len(deltas))
rawEngine = newEngine(lookbackDelta)
ld = lookbackDelta.Milliseconds()
)
engines[0] = defaultEngine
engines[0] = rawEngine
for i, d := range deltas[1:] {
if ld < d {
// Convert delta from milliseconds to time.Duration (nanoseconds).
engines[i+1] = newEngine(time.Duration(d * 1_000_000))
} else {
engines[i+1] = defaultEngine
engines[i+1] = rawEngine
}
}
return func(maxSourceResolutionMillis int64) *promql.Engine {
Expand Down

0 comments on commit 29ea24e

Please sign in to comment.