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=890de208e35a5b964d37f4f0065c1b8765853d70;hb=32bbad707629a44d17a7e9958b6ec462ba77fe49;hpb=8243ea78854683f2f80da53d8f197f10316e4801 diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index 890de208e3..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( @@ -630,15 +649,11 @@ def plot_throughput_speedup_analysis(plot, input_data): name="{0} perfect".format(name), legendgroup=name, showlegend=False, - mode="lines+markers", + mode="lines", line=dict( color=COLORS[cidx], width=2, dash="dash"), - marker=dict( - symbol="circle", - size=10 - ), text=["perfect: {0:.2f}Mpps".format(y) for y in val["ideal"]], hoverinfo="text"