[Erp5-report] r35436 jm - /erp5/trunk/products/ERP5/tests/_testInvalidationBug.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 18 23:34:09 CEST 2010


Author: jm
Date: Tue May 18 23:34:08 2010
New Revision: 35436

URL: http://svn.erp5.org?rev=35436&view=rev
Log:
_testInvalidationBug: log speed of creation of objects

Modified:
    erp5/trunk/products/ERP5/tests/_testInvalidationBug.py

Modified: erp5/trunk/products/ERP5/tests/_testInvalidationBug.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/_testInvalidationBug.py?rev=35436&r1=35435&r2=35436&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/_testInvalidationBug.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/_testInvalidationBug.py [utf8] Tue May 18 23:34:08 2010
@@ -72,7 +72,15 @@
 log('Created Organisations', (context,id_list))
 #log('All organisations', (context,[x for x in context.objectIds()]))
 context.activate(activity='SQLQueue').create_script()
-log('Organisation #', len(context))
+
+count = len(context)
+log('Organisation #', count)
+if not (count % 500):
+  if count == 500:
+    context.setProperty('perf_start', DateTime())
+  else:
+    log('creation speed: %s obj/s' % ((count - 500) /
+        (86400 * (DateTime() - context.getProperty('perf_start')))))
 """)
     for x in xrange(0,200):
       module.activate(activity='SQLQueue').create_script()




More information about the Erp5-report mailing list