Commit 9a31c518 authored by Jan Kiene's avatar Jan Kiene
Browse files

handle first run of complexity job in check_for_changes

parent 20b46b55
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -26,7 +26,12 @@ def check_linewise_logfile(filepath, cols):
        contents = [line for line in csv.reader(f, delimiter=" ")]

    curr = contents[-1]
    try:
        prev = contents[-2]
    except IndexError:
        # this is for handling first runs of new complexity jobs -> only one line present
        # do not report any changes then
        prev = curr

    change_ratios = [abs(float(curr[i]) / float(prev[i]) - 1) > THRESH for i in cols]
    changes_found = any(change_ratios)