Skip to content

Commit

Permalink
remove workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
mtanda committed May 25, 2018
1 parent 0f38629 commit a57c1d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func runQuery(indexer *Indexer, archiver *Archiver, q *prompb.Query, lookbackDel
// workaround, align query range to Prometheus original query range
lookbackDeltaMs := lookbackDelta.Nanoseconds() / 1000 / 1000
if (q.EndTimestampMs - q.StartTimestampMs) > lookbackDeltaMs*2 {
q.StartTimestampMs += lookbackDeltaMs
lookbackDeltaMs = 0
}
startTime := time.Unix(int64(q.StartTimestampMs/1000), int64(q.StartTimestampMs%1000*1000))
endTime := time.Unix(int64(q.EndTimestampMs/1000), int64(q.EndTimestampMs%1000*1000))
Expand Down

0 comments on commit a57c1d8

Please sign in to comment.