X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_plots.py;h=51b35d15f8d0d93b9b03786967b42d5600af6734;hp=1f5a1a7451673555fd910d3148081ed079cdb593;hb=3f8cd3759d371a5ac2df46cfb981cc3a599574ea;hpb=7d7ec5e661abec4dda2546843addf1a71580e97e diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index 1f5a1a7451..51b35d15f8 100644 --- a/resources/tools/presentation/generator_plots.py +++ b/resources/tools/presentation/generator_plots.py @@ -488,14 +488,12 @@ def plot_nf_reconf_box_name(plot, input_data): df_y = pd.DataFrame(y_vals) df_y.head() for i, col in enumerate(df_y.columns): + tst_name = re.sub(REGEX_NIC, u"", - col.lower().replace(u'-ndrpdr', u''). - replace(u'2n1l-', u'')) + col.lower().replace(u'-reconf', u''). + replace(u'2n1l-', u'').replace(u'2n-', u''). + replace(u'testpmd', u'')) - if u"ipsec" in tst_name: - show_name = u'-'.join(tst_name.split(u'-')[2:-1]) - else: - show_name = u'-'.join(tst_name.split(u'-')[3:-2]) traces.append(plgo.Box( x=[str(i + 1) + u'.'] * len(df_y[col]), y=df_y[col], @@ -504,7 +502,7 @@ def plot_nf_reconf_box_name(plot, input_data): f"({nr_of_samples[i]:02d} " f"run{u's' if nr_of_samples[i] > 1 else u''}, " f"packets lost average: {mean(loss[col]):.1f}) " - f"{show_name}" + f"{u'-'.join(tst_name.split(u'-')[2:])}" ), hoverinfo=u"y+name" ))