diff --git a/comparisons/compare-maxmem-summary.py b/comparisons/compare-maxmem-summary.py index 53fa5619ace..b48ea9312c5 100755 --- a/comparisons/compare-maxmem-summary.py +++ b/comparisons/compare-maxmem-summary.py @@ -27,7 +27,6 @@ def compare_maxmem_summary(**kwargs): inputFiles = glob.glob(os.path.join(inputDir, filePattern)) - steps = ["step1", "step2", "step3", "step4", "step5"] workflows = {} for inputFile in sorted(inputFiles): with open(inputFile, "r") as f: @@ -39,7 +38,7 @@ def compare_maxmem_summary(**kwargs): threshold = float(jsonDict["threshold"]) if workflow not in workflows: workflows[workflow] = {} - for step in steps: + for step in max_memory_pr_dict.keys(): max_mem_pr = max_memory_pr_dict[step].get("max memory used") if max_mem_pr: max_memory_pr = max_mem_pr / 1000000 @@ -86,7 +85,7 @@ def compare_maxmem_summary(**kwargs): max_mem_pr, max_mem_base, max_mem_pdiff = 0, 0, 0 for workflow in sortedworkflows: - for step in steps: + for step in sorted(workflows[workflow].keys()): max_mem_pr = workflows[workflow][step]["max memory pr"] max_mem_base = workflows[workflow][step]["max memory base"] max_mem_pdiff = workflows[workflow][step]["max memory pdiffs"]