presto-main/src/main/java/io/prestosql/server/remotetask/RemoteTaskStats.java/IncrementalAverage/add
class IncrementalAverage:        synchronized void add(long value)
        {
            count++;
            double oldAverage = average.get();
            average.set(oldAverage + ((value - oldAverage) / count));
        }