Not exactly. If there are no counter resets, then it's *(last value in time window - first value in time window) / (timestamp of last value - timestamp of first value)*
Consider a 5 minute window with 1 minute scrape intervals. You are likely to have 5 values within the window, and there is 4 minutes between the first and last. <--------- 5 mins --------> | X X X X X | <------ 4 mins -----> So the rate is calculated over the 4 minute period between the first and last X. Counter resets make it more complex than that; only the periods where the value is not decreasing are considered. On Saturday, 5 September 2020 07:56:35 UTC+1, Manish G wrote: > > And how about corresponding X axis value? Is it the start of the time > window or end or middle of it or something else? > The time at the *end* of the time window. That is, foo[1h] looks back 1 hour from the instant that the query is requested for. -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/c21f491e-ac62-4a81-90df-618941e9e709o%40googlegroups.com.

