Skip to content

Commit

Permalink
[querier] remove extend end time
Browse files Browse the repository at this point in the history
  • Loading branch information
taloric committed Oct 16, 2023
1 parent 646f4e7 commit c09624f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions server/querier/app/prometheus/service/promql.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,9 @@ func (p *prometheusExecutor) promQueryRangeExecute(ctx context.Context, args *mo
if start.Local().Unix()%int64(step.Seconds()) > int64(p.lookbackDelta.Seconds()) {
start = time.Unix(start.Local().Unix()-start.Local().Unix()%int64(step.Seconds()), 0)
}
if end.Local().Unix()%int64(step.Seconds()) > int64(p.lookbackDelta.Seconds()) {
end = time.Unix(end.Local().Unix()-end.Local().Unix()%int64(step.Seconds())+int64(step.Seconds()), 0)
}
if int(step.Seconds())%86400 == 0 {
year_start, month_start, day_start := start.Date()
year_end, month_end, day_end := end.Date()
start = time.Date(year_start, month_start, day_start, 0, 0, 0, 0, start.Location())
end = time.Date(year_end, month_end, day_end, 0, 0, 0, 0, end.Location())
}
qry, err := engine.NewRangeQuery(queriable, nil, args.Promql, start, end, step)
if qry == nil || err != nil {
Expand Down

0 comments on commit c09624f

Please sign in to comment.