diff --git a/erp5/util/benchmark/performance_tester.py b/erp5/util/benchmark/performance_tester.py index bcda8429991188a2dc9f6ec0694a7b184e39ca7f..10345284d187bf3df48e11077d008c5d98570aa9 100755 --- a/erp5/util/benchmark/performance_tester.py +++ b/erp5/util/benchmark/performance_tester.py @@ -77,6 +77,10 @@ class PerformanceTester(object): metavar='MODULE', help="Import users from ``user_tuple'' in MODULE") + parser.add_argument('--users-file-path', + metavar='USER_FILE_PATH', + help='User file path') + parser.add_argument('--users-range-increment', type=ArgumentType.checkIntValueWrapper(minimum=1), default=1, @@ -132,6 +136,13 @@ class PerformanceTester(object): metavar='ERP5_PUBLISH_PROJECT', help='ERP5 publish project') + + parser.add_argument('--benchmark-path-list', + default=[], + nargs='+', + metavar='BENCHMARK_PATH', + help='Benchmark paths') + # Mandatory arguments parser.add_argument('erp5_base_url', metavar='ERP5_URL') @@ -144,16 +155,23 @@ class PerformanceTester(object): nargs='+', metavar='BENCHMARK_SUITES', help='Benchmark suite modules') + @staticmethod def _check_parsed_arguments(namespace): + if namespace.users_file_path: + users_file_path_list = [namespace.users_file_path] + else: + users_file_path_list = [] namespace.user_tuple = ArgumentType.objectFromModule(namespace.user_info_filename, - object_name='user_tuple') - + object_name='user_tuple', + searchable_path_list=users_file_path_list) + object_benchmark_suite_list = [] for benchmark_suite in namespace.benchmark_suite_list: object_benchmark_suite_list.append(ArgumentType.objectFromModule(benchmark_suite, - callable_object=True)) + callable_object=True, + searchable_path_list=namespace.benchmark_path_list)) if namespace.repeat > 0: namespace.max_error_number = \