[Erp5-report] r45917 arnaud.fontaine - /erp5/trunk/utils/erp5.utils.benchmark/src/erp5/util...
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Jun 18 14:54:28 CEST 2011
Author: arnaud.fontaine
Date: Sat Jun 18 14:54:28 2011
New Revision: 45917
URL: http://svn.erp5.org?rev=45917&view=rev
Log:
Ensure the file is written to the disk when publishing the results
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=45917&r1=45916&r2=45917&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] Sat Jun 18 14:54:28 2011
@@ -355,6 +355,8 @@ class BenchmarkProcess(multiprocessing.P
self._current_repeat += 1
if self._current_repeat == 5 and self._publish_method:
+ result_file.flush()
+ os.fsync(result_file.fileno())
self._publish_method(self._result_filename, result_file.tell())
except StopIteration, e:
@@ -368,6 +370,8 @@ class BenchmarkProcess(multiprocessing.P
else:
if self._publish_method:
+ result_file.flush()
+ os.fsync(result_file.fileno())
self._publish_method(self._result_filename, result_file.tell())
self._exit_msg_queue.put(exit_msg)
More information about the Erp5-report
mailing list