What do time subqueries do in MetricsQL? [time1:time2]

19 Views Asked by At

I consistently go back and forth on whether the time subquery [12h:5m] is updating the calculation every five minutes or it is calculating every 15 seconds but looking at points 5 minutes apart instead of 15s, so 144 points instead of 2880.

When I look at this query it appears to be doing both. The 15 second values on the time series are updating every 5 minute, but the count is also scalling down to looking at 12 hour points every 5 minutes.

count_le_over_time(metric[12h:5m], 1)

This appears to be counting how many points out of 144 (12h, 5m interval) are less than 1. But it is also repeating that number every 15 seconds for 5 minutes.

count_le_over_time(metric[12h:5m], 1)

I expect how many points out of 144 are less than one, updating every 15 seconds.

What I see is how many points are less than 1 out of 144 repeating every 15 seconds and updating the count every 5 minutes.

Another example could be

avg_over_time(metric[12h:5m]) Is this calculating the average of 144 points over 12 hours or is it calculating the average of 2880 points and updating it every 5 minutes?

0

There are 0 best solutions below