Commit 87634184 authored by Roque's avatar Roque

benchmark: control for division by zero

parent 15728253
......@@ -80,10 +80,14 @@ class BenchmarkResultStatistic(object):
@property
def mean(self):
if self.n == 0:
self.n = 1
return self._value_sum / self.n
@property
def standard_deviation(self):
if self.n == 0:
self.n = 1
return math.sqrt(self._variance_sum / self.n)
class NothingFlushedException(Exception):
......
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