X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_plots.py;h=7298babe537f0b43a6e4fcabd5f9bbc03e3d6d20;hp=51b35d15f8d0d93b9b03786967b42d5600af6734;hb=0c02e000ae58474120246c484cf5458a76510288;hpb=3f8cd3759d371a5ac2df46cfb981cc3a599574ea diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index 51b35d15f8..7298babe53 100644 --- a/resources/tools/presentation/generator_plots.py +++ b/resources/tools/presentation/generator_plots.py @@ -336,7 +336,6 @@ def plot_hdrh_lat_by_percentile_x_log(plot, input_data): fig = plgo.Figure() layout = deepcopy(plot[u"layout"]) - xaxis_max = 0 for color, graph in enumerate(graphs): for idx, direction in enumerate((u"direction1", u"direction2")): @@ -357,7 +356,8 @@ def plot_hdrh_lat_by_percentile_x_log(plot, input_data): for item in decoded.get_recorded_iterator(): # The real value is "percentile". - # For 100%, we cut that down to "x_perc" to avoid infinity. + # For 100%, we cut that down to "x_perc" to avoid + # infinity. percentile = item.percentile_level_iterated_to x_perc = min(percentile, PERCENTILE_MAX) xaxis.append(previous_x) @@ -396,11 +396,9 @@ def plot_hdrh_lat_by_percentile_x_log(plot, input_data): hoverinfo=u"text" ) ) - xaxis_max = max(xaxis) if xaxis_max < max( - xaxis) else xaxis_max layout[u"title"][u"text"] = f"Latency: {name}" - layout[u"xaxis"][u"range"] = [0, int(log(xaxis_max, 10)) + 1] + layout[u"xaxis"][u"range"] = [0, 5.302] fig.update_layout(layout) # Create plot @@ -492,7 +490,7 @@ def plot_nf_reconf_box_name(plot, input_data): tst_name = re.sub(REGEX_NIC, u"", col.lower().replace(u'-reconf', u''). replace(u'2n1l-', u'').replace(u'2n-', u''). - replace(u'testpmd', u'')) + replace(u'-testpmd', u'')) traces.append(plgo.Box( x=[str(i + 1) + u'.'] * len(df_y[col]),