Commit aba28bf1 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Rename variance mean instance attribute to a more meaningful name.

parent ec8d291c
......@@ -51,7 +51,7 @@ class BenchmarkResultStatistic(object):
# For calculating the standard deviation
self._variance_sum = 0
self._mean = 0
self._variance_mean = 0
def __str__(self):
return "%s: min=%.3f, mean=%.3f (+/- %.3f), max=%.3f" % \
......@@ -74,9 +74,9 @@ class BenchmarkResultStatistic(object):
self._value_sum += value
self.n += 1
delta = value - self._mean
self._mean += delta / self.n
self._variance_sum += delta * (value - self._mean)
delta = value - self._variance_mean
self._variance_mean += delta / self.n
self._variance_sum += delta * (value - self._variance_mean)
@property
def mean(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment