chronograf icon indicating copy to clipboard operation
chronograf copied to clipboard

Account for absolute time ranges in auto GROUPBY interval calculation

Open lukevmorris opened this issue 9 years ago • 1 comments

Here's a query with a 2d relative timespan. Auto GROUPBY interval came out to 43s:

SELECT mean("usage_idle") AS "mean_usage_idle" FROM "telegraf"."autogen"."cpu" WHERE time > now() - 2d AND time < now() GROUP BY time(43s)

Here's the same query from the same graph with a 2d absolute timespan. Auto GROUPBY interval came out to 1s:

SELECT mean("usage_idle") AS "mean_usage_idle" FROM "telegraf"."autogen"."cpu" WHERE time > '2017-07-05T18:10:00.000Z' AND time < '2017-07-07T18:10:00.000Z' GROUP BY time(1s)

I would expect these values to be the same. It looks like chronograf.go:L195 is assuming a relative time range -- we need to expand support to include absolute ranges as well.

lukevmorris avatar Jul 07 '17 18:07 lukevmorris

@lukevmorris @timraymond what is the status of this, does it still need addressing?

nhaugo avatar Aug 07 '17 23:08 nhaugo