title: Datadog .rollup(sum, 60) vs .rollup(avg, 60) aggregation meaning
body: <p>What does .rollup(sum, 60) and .rollup(avg, 60) mean?
  This is my understanding</p>
  <blockquote>
  <p>.rollup(sum, 60) - sum up values every second for 60 seconds.<br />
  .rollup(avg, 60) - sum up values every second for 60 seconds and then
  divide by 60.</p>
  </blockquote>
  <p>Taking the example in screenshot, a time range of 5 mins produces these data points</p>
  <blockquote>
  <p>.rollup(sum, 60) : 863, 1570, 1470, 819, 988</p>
  </blockquote>
  <blockquote>
  <p>.rollup(avg, 60) : 215.75, 391.25, 368.5, 204.75, 247
  (note: all the avg values produced are a factor of 4, ex: 863/215.75 =
  4)</p>
  </blockquote>
  <p>However, as per my understanding, it should have produced these values (863/60s = 14.38)</p>
  <blockquote>
  <p>.rollup(avg, 60) - 14.38, 26.16, 24.5, 13.65, 16.46</p>
  </blockquote>
  <p>What am I missing?</p>
  <p>The metric is a counter metric published to datadog</p>
  <pre><code>applicationMonitor.counter(metric).increment();
  </code></pre>
  <p><a href="https://i.stack.imgur.com/kGA9j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kGA9j.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/FXHH4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FXHH4.png" alt="enter image description here" /></a></p>