X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_plots.py;h=f406539eaee8fc441a416f879fb375002ac80de6;hp=a488bdf8453cfcc4b9272c946c3c6d0cb830b8ce;hb=32bbad707629a44d17a7e9958b6ec462ba77fe49;hpb=f5feb996b72ae37fb5f84e0138b03b645fded899 diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index a488bdf845..f406539eae 100644 --- a/resources/tools/presentation/generator_plots.py +++ b/resources/tools/presentation/generator_plots.py @@ -149,7 +149,11 @@ def plot_performance_box(plot, input_data): y=[y / 1000000 if y else None for y in df[col]], name=name, **plot["traces"])) - val_max = max(df[col]) + try: + val_max = max(df[col]) + except ValueError as err: + logging.error(err) + continue if val_max: y_max.append(int(val_max / 1000000) + 1) @@ -241,15 +245,23 @@ def plot_latency_error_bars(plot, input_data): y_sorted = OrderedDict() y_tags_l = {s: [t.lower() for t in ts] for s, ts in y_tags.items()} for tag in order: + logging.info(tag) for suite, tags in y_tags_l.items(): - if tag.lower() in tags: - try: - y_sorted[suite] = y_tmp_vals.pop(suite) - y_tags_l.pop(suite) - except KeyError as err: - logging.error("Not found: {0}".format(err)) - finally: - break + if "not " in tag: + tag = tag.split(" ")[-1] + if tag.lower() in tags: + continue + else: + if tag.lower() not in tags: + continue + try: + y_sorted[suite] = y_tmp_vals.pop(suite) + y_tags_l.pop(suite) + logging.info(suite) + except KeyError as err: + logging.error("Not found: {0}".format(err)) + finally: + break else: y_sorted = y_tmp_vals @@ -437,7 +449,11 @@ def plot_throughput_speedup_analysis(plot, input_data): vals[name]["diff"] = \ [(y_val_1 - y_1c_max[test_name]) * 100 / y_val_1, None, None] - val_max = max(max(vals[name]["val"], vals[name]["ideal"])) + try: + val_max = max(max(vals[name]["val"], vals[name]["ideal"])) + except ValueError as err: + logging.error(err) + continue if val_max: y_max.append(int((val_max / 10) + 1) * 10) @@ -502,8 +518,11 @@ def plot_throughput_speedup_analysis(plot, input_data): x_vals = [1, 2, 4] # Limits: - threshold = 1.1 * max(y_max) # 10% - + try: + threshold = 1.1 * max(y_max) # 10% + except ValueError as err: + logging.error(err) + return nic_limit /= 1000000.0 if nic_limit < threshold: traces.append(plgo.Scatter(