title: Understanding increase() and rate() used on http_server_requests_seconds_count with prometheus and Grafana
body: <p>I tried to obtains these measurements from prometheus:</p>
  <ol>
  <li><code>increase(http_server_requests_seconds_count{uri=&quot;myURI&quot;}[10s])</code></li>
  <li><code>increase(http_server_requests_seconds_count{uri=&quot;myURI&quot;}[30s])</code></li>
  <li><code>rate(http_server_requests_seconds_count{uri=&quot;myURI&quot;}[10s])</code></li>
  <li><code>rate(http_server_requests_seconds_count{uri=&quot;myURI&quot;}[30s])</code></li>
  </ol>
  <p>Then I run a python script where 5 threads are created, each of them hitting this myURI endpoint:</p>
  <p>What I see on Grafana is:</p>
  <p><a href="https://i.stack.imgur.com/RVcFB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RVcFB.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/884tN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/884tN.png" alt="enter image description here" /></a></p>
  <p>I received these values:</p>
  <ol>
  <li>0</li>
  <li>6</li>
  <li>0</li>
  <li>0.2</li>
  </ol>
  <p>I expected to receive these (but didn't):</p>
  <ol>
  <li>5 (as in the last 10 seconds this endpoint received <strong>5</strong> calls)</li>
  <li>5 (as in the last 30 seconds this endpoint received <strong>5</strong> calls)</li>
  <li>0.5 (the endpoint received 5 calls in 10 seconds <strong>5/10</strong>)</li>
  <li>0.167 (the endpoint received 5 calls in 30 seconds <strong>5/30</strong>)</li>
  </ol>
  <p>Can someone explain with my example the formula behind this function and a way to achieve the metrics/value I expect?</p>