- tmp_classification = "outlier" if classification == "failure" \
- else classification
- index = None
- for idx in range(first_idx, len(classification_lst)):
- if classification_lst[idx] == tmp_classification:
- if rel_change_lst[idx]:
- index = idx
- break
- if index is None:
- continue
- for idx in range(index+1, len(classification_lst)):
- if classification_lst[idx] == tmp_classification:
- if rel_change_lst[idx]:
- if (abs(rel_change_lst[idx]) >
- abs(rel_change_lst[index])):
- index = idx
-
- logging.debug("{}".format(name))
- logging.debug("sample_lst: {} - {}".
- format(len(sample_lst), sample_lst))
- logging.debug("median_lst: {} - {}".
- format(len(median_lst), median_lst))
- logging.debug("rel_change: {} - {}".
- format(len(rel_change_lst), rel_change_lst))
- logging.debug("classn_lst: {} - {}".
- format(len(classification_lst), classification_lst))
- logging.debug("index: {}".format(index))
- logging.debug("classifica: {}".format(classification))
+ rel_change_long = round(
+ ((last_median_t - max_median) / max_median) * 100, 2)
+
+ logging.info("rel_change_last : {}".format(rel_change_last))
+ logging.info("rel_change_long : {}".format(rel_change_long))
+
+ tbl_lst.append(
+ [name,
+ '-' if isnan(last_median_t) else
+ round(last_median_t / 1000000, 2),
+ '-' if isnan(rel_change_last) else rel_change_last,
+ '-' if isnan(rel_change_long) else rel_change_long,
+ classification_lst[win_first_idx:].count("regression"),
+ classification_lst[win_first_idx:].count("progression"),
+ classification_lst[win_first_idx:].count("outlier")])
+
+ tbl_lst.sort(key=lambda rel: rel[0])