From d3716caa239cf07702e58d41ef0dbf86c04334db Mon Sep 17 00:00:00 2001 From: Oli Date: Sat, 27 Nov 2021 20:31:58 -0300 Subject: [PATCH] fix bug. not nice --- tests/performance/generation.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/performance/generation.py b/tests/performance/generation.py index 3a62ac6..7d61dfe 100644 --- a/tests/performance/generation.py +++ b/tests/performance/generation.py @@ -13,23 +13,33 @@ config_file_512 = os.path.abspath("./tests/performance/conf_gen_512.ini") CONFIG_FILES = [config_file_64, config_file_128, config_file_256, config_file_512] +index_1 = 0 + +index_8 = 0 + with Benchmarker() as bench: - for i,config_file in enumerate(CONFIG_FILES): + for i in range(len(CONFIG_FILES)): size = 2**(6+i) @bench(f"generation 1 core {size} tamaño") def _(bm): + global index_1 + config_file = CONFIG_FILES[index_1] with bm: os.system("CONFIG_FILE_PATH="+ config_file + " mpirun -oversubscribe -np 1 python3 -m memory_profiler mpirunner.py") ## teardown os.system("rm -rf ./tests/performance/tmp_gen_output") + index_1 +=1 @bench(f"generation 8 core {size} tamaño") def _(bm): + global index_8 + config_file = CONFIG_FILES[index_8] with bm: os.system("CONFIG_FILE_PATH="+ config_file + " mpirun -oversubscribe -np 8 python3 -m memory_profiler mpirunner.py") ## teardown - os.system("rm -rf ./tests/performance/tmp_gen_output") \ No newline at end of file + os.system("rm -rf ./tests/performance/tmp_gen_output") + index_8 +=1 \ No newline at end of file