diff --git a/run_all.py b/run_all.py index 8171ae8..3d86edd 100644 --- a/run_all.py +++ b/run_all.py @@ -9,6 +9,7 @@ from time import time for dir in [x for x in sorted(listdir('.')) if isdir(x)]: file = dir + '/' + dir + '.py' input = dir + '/input.txt' + total_run_time = 0 if isfile(file) and isfile(input): print('--------------------------------') print(dir, ':', sep='') @@ -19,4 +20,8 @@ for dir in [x for x in sorted(listdir('.')) if isdir(x)]: end_time = time() if p.returncode != 0: raise CalledProcessError(p.returncode, p.args) - print(f'Runtime: {end_time-start_time:.2f} s') + run_time = end_time-start_time + total_run_time += run_time + print(f'Runtime: {run_time:.2f} s') + print('--------------------------------') + print(f'Runtime: {total_run_time:.2f} s')