[Erp5-report] r8501 - /erp5/trunk/utils/erp5mechanize/runBenchmarks.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 18 17:06:42 CEST 2006
Author: vincent
Date: Tue Jul 18 17:06:39 2006
New Revision: 8501
URL: http://svn.erp5.org?rev=8501&view=rev
Log:
Change the format of result file to contain actual durations, even when the test was delayed between steps.
Print in the files when there was a failure in a test, so it can be detected just by reading the output data.
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=8501&r1=8500&r2=8501&view=diff
==============================================================================
--- erp5/trunk/utils/erp5mechanize/runBenchmarks.py (original)
+++ erp5/trunk/utils/erp5mechanize/runBenchmarks.py Tue Jul 18 17:06:39 2006
@@ -104,6 +104,7 @@
result = test['function'](url=self.url, name=self.name, password=self.password, lazyness=self.lazyness)
self.test_result_list.append({'id': test['id'], 'step_list': result})
except: # Don't let server error kill the whole test list - but notify that this test went wrong
+ raise
self.test_result_list.append({'id': test['id'], 'step_list': []})
def sig_handler(signal_number, stack):
@@ -186,7 +187,10 @@
step_list = test_result['step_list']
# Simple profiling : store an entry containing start & stop timestamps for each test
if results_file is not None:
- results_file.append(render_csv(thread.getName(), test_result['id'], step_list[0].getStart(), step_list[-1].getStop()))
+ duration = 0
+ for test_step in step_list:
+ duration += test_step.getDuration()
+ results_file.append(render_csv(thread.getName(), test_result['id'], duration))
# Detailed profiling : store an entry containing start & stop timestamps for each step
if dresults_file is not None:
for test_step in step_list: # Feed step-level output file
@@ -205,6 +209,10 @@
server_load_list[thread_url][timestamp]['cause_list'].append(cause)
else: # Test did fail.
print 'Failed'
+ if results_file is not None:
+ results_file.append(render_csv(thread.getName(), test_result['id'], 'FAILED')
+ if dresults_file is not None:
+ dresults_file.append(render_csv(thread.getName(), test_result['id'], 'FAILED')
test_result = thread.getResult() # Get next test result
if not thread.isAlive():
del thread_list[pos] # This thread won't move anymore, throw it.
More information about the Erp5-report
mailing list