Loading ci/basop-pages/create_report_pages.py +16 −3 Original line number Diff line number Diff line import csv import pathlib import argparse from functools import partial CSV_DELIM = ";" Loading Loading @@ -94,7 +95,7 @@ ARROW_DOWN = '<span class="arrowdown">⬂</span>' COLUMNS = ["testcase", "Result", "MLD", "MAXIMUM ABS DIFF"] COLUMNS_GLOBAL = COLUMNS[:1] COLUMNS_DIFFERENTIAL = COLUMNS[1:] COLUMNS_DIFFERENTIAL_NOT_MLD = COLUMNS_DIFFERENTIAL[2:] def create_subpage( html_out, Loading Loading @@ -210,7 +211,7 @@ def merge_and_cleanup_mld_reports( mld_col_curr = f"MLD-{id_current}" mld_col_prev = f"MLD-{id_previous}" def sort_func(x): def sort_func(x, other_col_pairs): """ Sort function for the rows. Puts missing or invalid values on top as those usually indicate crashes. Then sorts by MLD difference in descending order. MLD diffs of zero Loading @@ -224,12 +225,24 @@ def merge_and_cleanup_mld_reports( return float("inf") diff = float(x[mld_col_curr]) - float(x[mld_col_prev]) # if no diff in mld col found, check if there is a diff in any other measure if diff == 0: diff = float("-inf") diff_other = 0 for col_pair in other_col_pairs: col_prev = col_pair[0] col_curr = col_pair[1] diff_other += abs(float(x[col_curr]) - float(x[col_prev])) if diff_other > 0: diff = -1000000 return diff merged = sorted(merged, key=sort_func, reverse=True) other_col_pairs = [(f"{col}-{id_previous}", f"{col}-{id_current}") for col in COLUMNS_DIFFERENTIAL_NOT_MLD] merged = sorted(merged, key=partial(sort_func, other_col_pairs=other_col_pairs), reverse=True) # remove the unecessary whole path from the testcase names for row in merged: Loading Loading
ci/basop-pages/create_report_pages.py +16 −3 Original line number Diff line number Diff line import csv import pathlib import argparse from functools import partial CSV_DELIM = ";" Loading Loading @@ -94,7 +95,7 @@ ARROW_DOWN = '<span class="arrowdown">⬂</span>' COLUMNS = ["testcase", "Result", "MLD", "MAXIMUM ABS DIFF"] COLUMNS_GLOBAL = COLUMNS[:1] COLUMNS_DIFFERENTIAL = COLUMNS[1:] COLUMNS_DIFFERENTIAL_NOT_MLD = COLUMNS_DIFFERENTIAL[2:] def create_subpage( html_out, Loading Loading @@ -210,7 +211,7 @@ def merge_and_cleanup_mld_reports( mld_col_curr = f"MLD-{id_current}" mld_col_prev = f"MLD-{id_previous}" def sort_func(x): def sort_func(x, other_col_pairs): """ Sort function for the rows. Puts missing or invalid values on top as those usually indicate crashes. Then sorts by MLD difference in descending order. MLD diffs of zero Loading @@ -224,12 +225,24 @@ def merge_and_cleanup_mld_reports( return float("inf") diff = float(x[mld_col_curr]) - float(x[mld_col_prev]) # if no diff in mld col found, check if there is a diff in any other measure if diff == 0: diff = float("-inf") diff_other = 0 for col_pair in other_col_pairs: col_prev = col_pair[0] col_curr = col_pair[1] diff_other += abs(float(x[col_curr]) - float(x[col_prev])) if diff_other > 0: diff = -1000000 return diff merged = sorted(merged, key=sort_func, reverse=True) other_col_pairs = [(f"{col}-{id_previous}", f"{col}-{id_current}") for col in COLUMNS_DIFFERENTIAL_NOT_MLD] merged = sorted(merged, key=partial(sort_func, other_col_pairs=other_col_pairs), reverse=True) # remove the unecessary whole path from the testcase names for row in merged: Loading