[Erp5-report] r46010 arnaud.fontaine - /erp5/trunk/utils/erp5.utils.benchmark/src/erp5/util...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Aug 29 14:47:17 CEST 2011
Author: arnaud.fontaine
Date: Mon Aug 29 14:47:17 2011
New Revision: 46010
URL: http://svn.erp5.org?rev=46010&view=rev
Log:
Add error properly rather than assuming that a value equals to 0 is an error
Modified:
erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/benchmark.py
Modified: erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/benchmark.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/benchmark.py?rev=46010&r1=46009&r2=46010&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/benchmark.py [utf8] (original)
+++ erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/benchmark.py [utf8] Mon Aug 29 14:47:17 2011
@@ -138,11 +138,10 @@ class BenchmarkResultStatistic(object):
self._variance_sum = 0
self._mean = 0
- def add(self, value):
- if value == 0:
- self.error_sum += 1
- return
+ def add_error(self):
+ self.error_sum += 1
+ def add(self, value):
if value < self.minimum:
self.minimum = value
if value > self.maximum:
@@ -239,7 +238,7 @@ class BenchmarkResult(object):
expected_result_idx = self._result_idx_checkpoint_list[self._suite_idx]
while self._result_idx != expected_result_idx:
self.result_list.append(0)
- self._stat_list[self._result_idx].add(0)
+ self._stat_list[self._result_idx].add_error()
self._result_idx += 1
self._suite_idx += 1
More information about the Erp5-report
mailing list