What does duration  mean when used in Prometheus UI Graph
In Prometheus when the below query would mean fetching all samples observed during 5m period and then perform the rate calculation with those samples and the the duration.
When i run this in Table mode in Prometheus UI I get to select a time and then the interval is then determined based my duration and the timestamp i chose. This makes sense.
But what happens when i switch to Graph tab? It accepts a duration in the UI along with the timestamp. Say I select 1 hour duration with the same query above the resulting graph covers 1 hour. How does the graph work for 1 hour while my query has explicitly selected 5 mins as duration for rate calculation.
Thanks in advance for your help.
In the "Graph" tab, Prometheus calculates the 5m rate in a moving window during the 1h interval. It starts calculating the rate for the first 5m (between 1h ago and 1h-5m ago), then it continues calculating the rate moving this 5m window for each timestamp, until the end (between 5m ago and now). It plots all the results in the graph, so you can verify how the 5m rate changed in time.