[Erp5-report] r9628 - /erp5/trunk/utils/erp5mechanize/runBenchmarks.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Sep 4 11:25:58 CEST 2006
Author: vincent
Date: Mon Sep 4 11:25:56 2006
New Revision: 9628
URL: http://svn.erp5.org?rev=9628&view=rev
Log:
Make possible to define which tests should be run at user level. Move the repetition code accordingly, and make it pythonish.
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=9628&r1=9627&r2=9628&view=diff
==============================================================================
--- erp5/trunk/utils/erp5mechanize/runBenchmarks.py (original)
+++ erp5/trunk/utils/erp5mechanize/runBenchmarks.py Mon Sep 4 11:25:56 2006
@@ -169,13 +169,6 @@
if load is not None:
load_file = LogFile(load)
del load
- temp_list = []
- for repetition in xrange(int(Repeat)): # 0 mean only one execution, 1 means
- # two executions, etc.
- temp_list.extend(test_list)
- test_list.extend(temp_list)
- del temp_list
- del Repeat
# Catch all signals who could lead to 'soft' program termination
# FIXME: there should be more signals.
for signal_number in (signal.SIGHUP, signal.SIGSEGV, signal.SIGTERM):
@@ -214,13 +207,15 @@
if user is not None:
thread = BenchmarkThread(url=instance['url'], name=user['name'],
password=user['password'],
- test_list=test_list)
+ test_list=(user.get('test_list') or test_list) * (Repeat + 1))
thread.setName('%s@%s' % (user['name'], instance['url']))
if Lazyness is not None:
thread.setLazyness(float(Lazyness))
thread_list.append(thread)
if len(thread_list) >= usercount:
break
+ del Repeat
+ del test_list
print '%s: Starting %s threads' % (time(), len(thread_list))
[thread.start() for thread in thread_list] # Start all threads at 'once'.
More information about the Erp5-report
mailing list