diff --git a/erp5/util/benchmark/result.py b/erp5/util/benchmark/result.py index f5a88c2fd995dcafdd182b63ab3fc700cd692ab2..49bfc6056e3d74ef578ae3da3e400f0576b6ca7d 100644 --- a/erp5/util/benchmark/result.py +++ b/erp5/util/benchmark/result.py @@ -44,6 +44,7 @@ class BenchmarkResultStatistic(object): self.minimum = sys.maxint self.maximum = -1 self.n = 0 + self.error_sum = 0 # For calculating the mean self._value_sum = 0 @@ -53,6 +54,10 @@ class BenchmarkResultStatistic(object): self._mean = 0 def add(self, value): + if value < 0: + self.error_sum += 1 + return + if value < self.minimum: self.minimum = value if value > self.maximum: