X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_plots.py;h=88af4a46657830040f2c16a7c01d80930037c027;hp=c9018f4429a293d57b220214e6fc6b4a29d85bcd;hb=879b31f02fb4df52016d7465e21377121dfbb515;hpb=d6615bce0d5ac4cb88bbeec584fa7094a6db2c06 diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index c9018f4429..88af4a4665 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,12 @@ 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] + # layout[u"xaxis"][u"range"] = [ + # 0, round(log(100.0 / (100.0 - PERCENTILE_MAX), 10)) + # ] fig.update_layout(layout) # Create plot