Skip to content

Commit 4db0a4d

Browse files
committed
Handle case where job exists in database but has no memory profiling samples recorded. Handle first time a test is run.
1 parent 56dc947 commit 4db0a4d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

memprof_plotter/plotter.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ def check_memory_anomaly(category: str, test_name: str, rss: dict[int, list[floa
126126
test and issue a warning via github annotation if the memory usage is more than 20% above the
127127
average of the n previous runs.
128128
"""
129-
if any([max(tl) <= 60.0 for tl in times.values()]):
129+
if len(rss) == 1:
130+
return
131+
132+
if any([max(tl or [0.0,]) <= 60.0 for tl in times.values()]):
130133
return
131134

132135
max_mems = {i: max(rl) for i, rl in rss.items()}

0 commit comments

Comments
 (0)