@VisibleForTesting
    void add(long time, long value) {
      data[nextPos].nanoTime = time;
      data[nextPos].value = value;
      nextPos++;
      if (nextPos == windowDataSize) {
        nextPos = 0;
      }
    }
Calculates the average for the last windowTimeSize window.
@return The average
llap-server/src/java/org/apache/hadoop/hive/llap/metrics/LlapDaemonExecutorMetrics.java