Commit 318841ae authored by Benjamin Blanc's avatar Benjamin Blanc

scalability: use new user file

parent 4f09471c
# Specify user login/password used to run the tests. Note that there must be # Specify user login/password used to run the tests. Note that there must be
# the same number of users specified here *and* on the script command-line. # the same number of users specified here *and* on the script command-line.
user_tuple = ( user_tuple = (
('scalability_user', 'insecure'), ('zope', 'insecure'),
('scalability_user', 'insecure'),
('scalability_user', 'insecure'),
('scalability_user', 'insecure'),
('scalability_user', 'insecure'),
) )
# A more complex example setting the source IP address as well, assuming the # A more complex example setting the source IP address as well, assuming the
......
...@@ -274,9 +274,7 @@ class ScalabilityLauncher(object): ...@@ -274,9 +274,7 @@ class ScalabilityLauncher(object):
# Get suite informations # Get suite informations
suite = makeSuite(self.__argumentNamespace.test_suite, self.log) suite = makeSuite(self.__argumentNamespace.test_suite, self.log)
test_suites = suite.getTestList() test_suites = suite.getTestList()
test_path = suite.getTestPath()
while time.time()-start_time < max_time: while time.time()-start_time < max_time:
time.sleep(5) time.sleep(5)
...@@ -296,9 +294,9 @@ class ScalabilityLauncher(object): ...@@ -296,9 +294,9 @@ class ScalabilityLauncher(object):
current_test_number = int(current_test.title) current_test_number = int(current_test.title)
test_duration = suite.getTestDuration(current_test_number) test_duration = suite.getTestDuration(current_test_number)
benchmark_path_list = os.path.join(self.__argumentNamespace.erp5_location, test_path) benchmark_path_list = os.path.join(self.__argumentNamespace.erp5_location, suite.getTestPath())
#TODO: generate a basic user file with all scalability users. #TODO: generate a basic user file with all scalability users.
user_file_path = os.path.join(self.__argumentNamespace.erp5_location, test_path) user_file_path = os.path.join(self.__argumentNamespace.erp5_location, suite.getUsersFilePath())
tester_path = self.__argumentNamespace.runner_path tester_path = self.__argumentNamespace.runner_path
user_number = suite.getUserNumber(current_test_number) user_number = suite.getUserNumber(current_test_number)
......
...@@ -132,6 +132,9 @@ class ERP5_scalability(_ERP5): ...@@ -132,6 +132,9 @@ class ERP5_scalability(_ERP5):
def getTestPath(self): def getTestPath(self):
return 'erp5/util/benchmark/examples/' return 'erp5/util/benchmark/examples/'
def getUsersFilePath(self):
return 'erp5/util/benchmark/examples/scalabilityUsers'
def getUserNumber(self, test_number): def getUserNumber(self, test_number):
user_number = 1 user_number = 1
......
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