From: Tibor Frank Date: Wed, 3 Feb 2021 16:03:54 +0000 (+0100) Subject: Report: Latency graphs X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=df3b53935c5db2e53cf8e72ca2ef5be995071e69;hp=2ef820ee52ec7176d0923dbb1f675e0576ddf56b Report: Latency graphs Change-Id: I5ca267827a549f7378c289e7db1d3bb89f5482eb Signed-off-by: Tibor Frank --- diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index c9018f4429..650a51c5a7 100644 --- a/resources/tools/presentation/generator_plots.py +++ b/resources/tools/presentation/generator_plots.py @@ -62,7 +62,7 @@ COLORS = ( REGEX_NIC = re.compile(r'(\d*ge\dp\d\D*\d*[a-z]*)-') # This value depends on latency stream rate (9001 pps) and duration (5s). -PERCENTILE_MAX = 99.9995 +PERCENTILE_MAX = 99.9999 def generate_plots(spec, data): @@ -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,11 @@ 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, round(log(100.0 / (100.0 - PERCENTILE_MAX), 10)) + ] fig.update_layout(layout) # Create plot diff --git a/resources/tools/presentation/specification.yaml b/resources/tools/presentation/specification.yaml index df19641f60..393d24f151 100644 --- a/resources/tools/presentation/specification.yaml +++ b/resources/tools/presentation/specification.yaml @@ -2578,7 +2578,7 @@ titlefont: size: 14 autorange: False - fixedrange: False + fixedrange: True gridcolor: "rgb(230, 230, 230)" linecolor: "rgb(220, 220, 220)" linewidth: 1 @@ -2586,8 +2586,8 @@ showline: True showticklabels: True tickcolor: "rgb(220, 220, 220)" - tickvals: [1, 2, 1e1, 20, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9] - ticktext: [0, 50, 90, 95, 99, 99.9, 99.99, 99.999, 99.9999, 99.99999, 99.999999, 99.9999999] + tickvals: [1, 2, 1e1, 20, 1e2, 1e3, 1e4, 1e5, 1e6] + ticktext: [0, 50, 90, 95, 99, 99.9, 99.99, 99.999, 99.9999] tickfont: size: 14 yaxis: