private long sum(int bound) {
    long sum = 0;
    for (int i = 0; i < bound; i++) {
      sum += getStatisticsAtIndex(i);
    }
    return sum;
  }
Move forward the most recent index.
@return the most recent index
hbase-common/src/main/java/org/apache/hadoop/hbase/util/WindowMovingAverage.java