Skip to content

Commit

Permalink
Account for missing step5 in some workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed Sep 19, 2024
1 parent bf4f088 commit e2c295a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions comparisons/compare-maxmem-summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit e2c295a

Please sign in to comment.