[Erp5-report] r8508 - /erp5/trunk/utils/erp5mechanize/runBenchmarks.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jul 18 17:58:21 CEST 2006


Author: vincent
Date: Tue Jul 18 17:58:20 2006
New Revision: 8508

URL: http://svn.erp5.org?rev=8508&view=rev
Log:
Add the possibility to repeat automatically a test suite, to lower the average impact of initial load increase and final load decrease.

Modified:
    erp5/trunk/utils/erp5mechanize/runBenchmarks.py

Modified: erp5/trunk/utils/erp5mechanize/runBenchmarks.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5mechanize/runBenchmarks.py?rev=8508&r1=8507&r2=8508&view=diff
==============================================================================
--- erp5/trunk/utils/erp5mechanize/runBenchmarks.py (original)
+++ erp5/trunk/utils/erp5mechanize/runBenchmarks.py Tue Jul 18 17:58:20 2006
@@ -139,7 +139,7 @@
     values[pos].replace('.', ',')
   return ';'.join(values)
 
-def main(instance_list, test_list, dresults=None, results=None, load=None, Lazyness=None, usercount=None):
+def main(instance_list, test_list, dresults=None, results=None, load=None, Lazyness=None, usercount=None, Repeat=0):
   """
     Create one thread per (instance, user).
     Start threads.
@@ -157,6 +157,8 @@
   if load is not None:
     load_file = LogFile(load)
   del load
+  for repetition in xrange(int(Repeat)): # 0 mean only one execution, 1 means two executions, etc.
+    test_list.extend(test_list)
   for signal_number in (signal.SIGHUP, signal.SIGSEGV, signal.SIGTERM): # All signal who could lead to 'soft' program termination
     signal.signal(signal_number, sig_handler)
   usercount = int(usercount)
@@ -230,7 +232,7 @@
 
 if __name__ == '__main__':
   import getopt
-  possible_arg_list = ('config', 'dresults', 'results', 'load', 'Lazyness', 'usercount')
+  possible_arg_list = ('config', 'dresults', 'results', 'load', 'Lazyness', 'usercount', 'Repeat')
   possible_opt_list = ('verbose', )
   kw = {}
   args = []




More information about the Erp5-report mailing list