diff --git a/promql/engine.go b/promql/engine.go index 87914c30f..a3321fc87 100644 --- a/promql/engine.go +++ b/promql/engine.go @@ -438,7 +438,7 @@ func (ng *Engine) exec(ctx context.Context, q *query) (v Value, w storage.Warnin params["start"] = formatDate(eq.Start) params["end"] = formatDate(eq.End) // The step provided by the user is in seconds. - params["step"] = durationMilliseconds(eq.Interval) / 1000 + params["step"] = int64(eq.Interval / (time.Second / time.Nanosecond)) } f := []interface{}{"params", params} if err != nil {