[Erp5-report] r30470 - /erp5/trunk/products/ERP5Type/tests/testPerformance.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 10 14:30:57 CET 2009


Author: kazuhiko
Date: Tue Nov 10 14:30:55 2009
New Revision: 30470

URL: http://svn.erp5.org?rev=30470&view=rev
Log:
fill cache out of the loop, otherwise the test and its result become too different.

Modified:
    erp5/trunk/products/ERP5Type/tests/testPerformance.py

Modified: erp5/trunk/products/ERP5Type/tests/testPerformance.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/testPerformance.py?rev=30470&r1=30469&r2=30470&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/testPerformance.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/testPerformance.py [utf8] Tue Nov 10 14:30:55 2009
@@ -208,6 +208,8 @@
       view_result = {}
       tic_result = {}
       add_result = {}
+      # call view once to fill caches
+      self.bar_module.BarModule_viewBarList()
       # add object in bar module
       for i in xrange(10):
           def add():
@@ -229,8 +231,6 @@
               self.tic()
           after_tic = time()
           gc.collect()
-          # call view once to fill caches
-          self.bar_module.BarModule_viewBarList()
           before_form = time()
           for x in xrange(100):
             self.bar_module.BarModule_viewBarList()




More information about the Erp5-report mailing list