X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_plots.py;h=af901241835694718a8012da3e63719ea0db553a;hb=5f1007cce8831017fd2be1f38a6ad023c349019a;hp=fb1b4734cfad5c1be1f15a8056b5d48e90621176;hpb=c763cfcb064e4f4acf6b8309b08d3800b9bd5331;p=csit.git diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index fb1b4734cf..af90124183 100644 --- a/resources/tools/presentation/generator_plots.py +++ b/resources/tools/presentation/generator_plots.py @@ -606,6 +606,19 @@ def plot_perf_box_name(plot, input_data): ) test_type = u"HOSTSTACK" + elif test[u"type"] in (u"LDP_NGINX",): + if u"TCP_CPS" in test[u"tags"]: + test_type = u"VSAP_CPS" + y_vals[test[u"parent"]].append( + test[u"result"][u"cps"] / 1e6 + ) + elif u"TCP_RPS" in test[u"tags"]: + test_type = u"VSAP_RPS" + y_vals[test[u"parent"]].append( + test[u"result"][u"rps"] / 1e6 + ) + else: + continue else: continue @@ -651,7 +664,7 @@ def plot_perf_box_name(plot, input_data): try: val_max = max(df_y[col]) if val_max: - y_max.append(int(val_max / 1e6) + 2) + y_max.append(int(val_max / 1e6)) except (ValueError, TypeError) as err: logging.error(repr(err)) continue @@ -662,10 +675,16 @@ def plot_perf_box_name(plot, input_data): if layout.get(u"title", None): if test_type in (u"HOSTSTACK", ): layout[u"title"] = f"Bandwidth: {layout[u'title']}" + elif test_type == u"VSAP_CPS": + layout[u"title"] = f"CPS: {layout[u'title']}" + layout[u"yaxis"][u"title"] = u"Connection Rate [Mcps]" + elif test_type == u"VSAP_RPS": + layout[u"title"] = f"RPS: {layout[u'title']}" + layout[u"yaxis"][u"title"] = u"Connection Rate [Mrps]" else: - layout[u"title"] = f"Throughput: {layout[u'title']}" - if y_max: - layout[u"yaxis"][u"range"] = [0, max(y_max)] + layout[u"title"] = f"Tput: {layout[u'title']}" + if y_max and max(y_max) > 1: + layout[u"yaxis"][u"range"] = [0, max(y_max) + 2] plpl = plgo.Figure(data=traces, layout=layout) # Export Plot @@ -777,7 +796,7 @@ def plot_ndrpdr_box_name(plot, input_data): layout[u"title"] = f"CPS: {layout[u'title']}" else: layout[u"title"] = \ - f"Throughput: {layout[u'title']}" + f"Tput: {layout[u'title']}" if data_y_max: layout[u"yaxis"][u"range"] = [0, max(data_y_max) / 1e6 + 1] plpl = plgo.Figure(data=traces, layout=layout) @@ -872,7 +891,7 @@ def plot_mrr_box_name(plot, input_data): layout = deepcopy(plot[u"layout"]) if layout.get(u"title", None): layout[u"title"] = ( - f"Throughput: {layout[u'title'].format(core=core)}" + f"Tput: {layout[u'title'].format(core=core)}" ) if data_y_max: layout[u"yaxis"][u"range"] = [0, max(data_y_max) + 1]