public static float getAverage(float totalNumber, int size) {
    if (totalNumber != 0 && size != 0) {

      return totalNumber / size;
    }
    return 0;
  }
This is a utility class to calculate various type of Metrics out of raw stats
geode-core/src/main/java/org/apache/geode/management/internal/beans/MetricsCalculator.java