title: How does OpenTSDB downsample data
body: <p>I have a 2 part question regarding downsampling on OpenTSDB. <br> <br>
  The first is I was wondering if anyone knows whether OpenTSDB takes the last end point inclusive or exclusive when it calculates downsampling, or does it count the end data point twice?</p>
  
  <p>For example, if my time interval is 12:30pm-1:30pm and I get DPs every 5 min starting at 12:29:44pm and my downsample interval is summing every 10 minute block, does the system take the DPs from 12:30-12:39 and summing them, 12:40-12:49 and sum them, etc or does it take the DPs from 12:30-12:40, then from 12:40-12:50, etc.  Yes, I know my data is off by 15 sec but I don't control that.</p>
  
  <p>I've tried to calculate it by hand but the data I have isn't helping me.  The numbers I'm calculating aren't adding up to the above, nor is it matching what the graph is showing.  I don't have access to the system that's pushing numbers into OpenTSDB so I can't setup dummy data to check.</p>
  
  <p>The second question is how does downsampling plot its points on the graph from my time range and downsample interval?  I set downsample to sum 10 min blocks.  I set my range to be 12:30pm-1:30pm.  The graph shows the first point of the downsampled graph to start at 12:35pm.  That makes logical sense.<br>I change the range to be 12:24pm-1:29pm and expected the first point to start at 12:30 but the first point shown is 12:25pm.  </p>
  
  <p>Hopefully someone can answer these questions for me.  In the meantime, I'll continue trying to find some data in my system that helps show/prove how downsampling should work.</p>
  
  <p>Thanks in advance for your help.</p>