def test_files_creation(self, context, clients, params): user_directio = "u1" user_proxy = "u2" client_directio = context.get_client(user_directio, 'client-directio') client_proxy = context.get_client(user_proxy, 'client-proxy') files_number = params['files_number']['value'] empty_files = params['empty_files']['value'] for client in (client_directio, client_proxy): conn = client.rpyc_connection conn._config['sync_request_timeout'] = RPYC_TIMEOUT dir_path_directio = mkdtemp(client_directio, dir=client_directio.absolute_path('s1')) dir_path_proxy = mkdtemp(client_proxy, dir=client_proxy.absolute_path('s1')) dir_path_host = mkdtemp(client_proxy, dir=user_home_dir(user_proxy)) test_result1 = execute_file_creation_test(client_directio, files_number, empty_files, dir_path_directio, 'direct IO') test_result2 = execute_file_creation_test(client_proxy, files_number, empty_files, dir_path_proxy, 'cluster-proxy') test_result3 = execute_file_creation_test(client_proxy, files_number, empty_files, dir_path_host, 'host system') # removal of entire directory tree can take several minutes, so as to # evade connection timeout while removing everything at once, # rm files one at time instead teardown_after_file_creation_test(client_directio, files_number, dir_path_directio) teardown_after_file_creation_test(client_proxy, files_number, dir_path_proxy) teardown_after_file_creation_test(client_proxy, files_number, dir_path_host) rm(client_directio, dir_path_directio, recursive=True, force=True) rm(client_proxy, dir_path_proxy, recursive=True, force=True) rm(client_proxy, dir_path_host, recursive=True, force=True) return test_result1 + test_result2 + test_result3
def test_files_creation(self, context, clients, params): user_directio = "u1" user_proxy = "u2" client_directio = context.get_client(user_directio, 'client-directio') client_proxy = context.get_client(user_proxy, 'client-proxy') files_number = params['files_number']['value'] empty_files = params['empty_files']['value'] dir_path_directio = mkdtemp(client_directio, dir=client_directio.absolute_path('s1')) dir_path_proxy = mkdtemp(client_proxy, dir=client_proxy.absolute_path('s1')) dir_path_host = mkdtemp(client_proxy, dir=user_home_dir(user_proxy)) test_result1 = execute_file_creation_test(client_directio, files_number, empty_files, dir_path_directio, 'direct IO') test_result2 = execute_file_creation_test(client_proxy, files_number, empty_files, dir_path_proxy, 'cluster-proxy') test_result3 = execute_file_creation_test(client_proxy, files_number, empty_files, dir_path_host, 'host system') # removal of entire directory tree can take several minutes, so as to # evade connection timeout while removing everything at once, # rm files one at time instead teardown_after_file_creation_test(client_directio, files_number, dir_path_directio) teardown_after_file_creation_test(client_proxy, files_number, dir_path_proxy) teardown_after_file_creation_test(client_proxy, files_number, dir_path_host) rm(client_directio, dir_path_directio, recursive=True, force=True) rm(client_proxy, dir_path_proxy, recursive=True, force=True) rm(client_proxy, dir_path_host, recursive=True, force=True) return test_result1 + test_result2 + test_result3
def test_sysbench(self, context, clients, params): user_directio = "u1" user_proxy = "u2" client_directio = context.get_client(user_directio, "client-directio") client_proxy = context.get_client(user_proxy, "client-proxy") threads = params['threads']['value'] files_number = params['files_number']['value'] total_size = params['total_size']['value'] mode = params['mode']['value'] validate = params['validate']['value'] events = params['events']['value'] report_interval = params['report_interval']['value'] time = params['time']['value'] file_block_size = params['file_block_size']['value'] dir_path_directio = mkdtemp(client_directio, dir=client_directio.absolute_path("s1")) dir_path_proxy = mkdtemp(client_proxy, dir=client_proxy.absolute_path("s1")) print("\n################################## DIRECT-IO client (%s) ##################################\n"%(mode)) execute_sysbench_test(client_directio, user_directio, threads, total_size, files_number, mode, validate, events, report_interval, time, file_block_size, dir_path_directio) print("\n################################## PROXY-IO client (%s) ##################################\n"%(mode)) execute_sysbench_test(client_proxy, user_proxy, threads, total_size, files_number, mode, validate, events, report_interval, time, file_block_size, dir_path_proxy) rm(client_directio, dir_path_directio, recursive=True, force=True) rm(client_proxy, dir_path_proxy, recursive=True, force=True)
def test_sysbench(self, context, clients, params): user_directio = "u1" user_proxy = "u2" client_directio = context.get_client(user_directio, "client-directio") client_proxy = context.get_client(user_proxy, "client-proxy") threads_number = params['threads_number']['value'] files_number = params['files_number']['value'] total_size = params['total_size']['value'] mode = params['mode']['value'] dir_path_directio = mkdtemp(client_directio, dir=client_directio.absolute_path("s1")) dir_path_proxy = mkdtemp(client_proxy, dir=client_proxy.absolute_path("s1")) dir_path_host = mkdtemp(client_proxy, dir=user_home_dir(user_proxy)) test_result1 = execute_sysbench_test(client_directio, user_directio, threads_number, total_size, files_number, mode, dir_path_directio, "direct IO") test_result2 = execute_sysbench_test(client_proxy, user_proxy, threads_number, total_size, files_number, mode, dir_path_proxy, "cluster-proxy") test_result3 = execute_sysbench_test(client_proxy, user_proxy, threads_number, total_size, files_number, mode, dir_path_host, "host system") rm(client_directio, dir_path_directio, recursive=True, force=True) rm(client_proxy, dir_path_proxy, recursive=True, force=True) rm(client_proxy, dir_path_host, recursive=True, force=True) return test_result1 + test_result2 + test_result3
def test_concurrent_files_creation(self, context, clients, params): user_directio = "u1" user_proxy = "u2" client_directio = context.get_client(user_directio, 'client-directio') client_proxy = context.get_client(user_proxy, 'client-proxy') files_number = params['files_number']['value'] empty_files = params['empty_files']['value'] threads_num = params['threads_num']['value'] dir_path_directio = mkdtemp(client_directio, dir=client_directio.absolute_path('s1')) dir_path_proxy = mkdtemp(client_proxy, dir=client_proxy.absolute_path('s1')) dir_path_host = mkdtemp(client_proxy, dir=user_home_dir(user_proxy)) test_result1 = _execute_test(client_directio, files_number, empty_files, threads_num, dir_path_directio, 'direct IO') test_result2 = _execute_test(client_proxy, files_number, empty_files, threads_num, dir_path_proxy, 'cluster-proxy') test_result3 = _execute_test(client_proxy, files_number, empty_files, threads_num, dir_path_host, 'host system') # removal of entire directory tree can take several minutes so as to # evade connection timeout while removing everything at once, # rm files one at time instead _teardown_after_test(client_directio, files_number, dir_path_directio) _teardown_after_test(client_proxy, files_number, dir_path_proxy) _teardown_after_test(client_proxy, files_number, dir_path_host) rm(client_directio, dir_path_directio, recursive=True, force=True) rm(client_proxy, dir_path_proxy, recursive=True, force=True) rm(client_proxy, dir_path_host, recursive=True, force=True) return test_result1 + test_result2 + test_result3