Commit d294ead3 authored by Benjamin Blanc's avatar Benjamin Blanc

scalability: runScalabilityTestSuite: add logs

parent ac48516b
......@@ -86,6 +86,7 @@ def getCreatedDocumentNumberFromERP5(erp5_url, log):
"""
Get the number of created documents
"""
log("count docs number from ERP5 instance")
count_retry = 0
zope_connection = getConnection(erp5_url, log)
while count_retry < 100 :
......@@ -98,6 +99,7 @@ def getCreatedDocumentNumberFromERP5(erp5_url, log):
result = zope_connection.getresponse()
return int(result.read())
except:
log("retry..")
count_retry += 1
time.sleep(15)
raise ValueError("Impossible to get number of docs from ERP5")
......@@ -333,7 +335,7 @@ class ScalabilityLauncher(object):
# Waiting for 0-pending activities
waitFor0PendingActivities(self.__argumentNamespace.erp5_url, self.log)
previous_document_number = getCreatedDocumentNumberFromERP5(self.__argumentNamespace.erp5_url, self.log)
self.log("previous_document_number: %d" previous_document_number)
# Here call a runScalabilityTest ( placed on product/ERP5Type/tests ) ?
self.log("Test Case %s is running..." %(current_test.title))
try:
......@@ -380,6 +382,10 @@ class ScalabilityLauncher(object):
current_document_number = getCreatedDocumentNumberFromERP5(self.__argumentNamespace.erp5_url, self.log)
created_document_number = current_document_number - previous_document_number
self.log("previous_document_number: %d" previous_document_number)
self.log("current_document_number: %d" current_document_number)
self.log("created_document_number: %d" created_document_number)
failed_document_number = 0
created_document_per_hour_number = ( (float(created_document_number)*60*60) / float(test_duration) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment