public double getAverage() {
    return size == 0 ? 0 : sum / size;
  }
Get the average of the values in the collection

@return average value
samza-api/src/main/java/org/apache/samza/metrics/Snapshot.java