diff options
author | Tibor Frank <tifrank@cisco.com> | 2021-11-16 13:07:39 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2021-11-16 13:14:23 +0100 |
commit | 92a8cc02adf1b8c152685c46a9f0d9413b518115 (patch) | |
tree | 28c12b6c444c75288caf36ecb1f29b201c96a433 /resources/tools/presentation | |
parent | 84ec89bbb5e870ab72ddbab024eb6e87b909905d (diff) |
PAL: Add box points to all box graphs
- enabled only for aws throughput and soak
Change-Id: I3c4266e35d98d8319ef1e5c365734338195a40d9
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation')
3 files changed, 28 insertions, 17 deletions
diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py index 6006ae9b6a..2d723145bf 100644 --- a/resources/tools/presentation/generator_plots.py +++ b/resources/tools/presentation/generator_plots.py @@ -777,7 +777,6 @@ def plot_perf_box_name(plot, input_data): else: data_y = [y / 1e6 if y else None for y in df_y[col]] kwargs = dict( - x=[str(i + 1) + u'.'] * len(df_y[col]), y=data_y, name=( f"{i + 1}. " @@ -789,6 +788,7 @@ def plot_perf_box_name(plot, input_data): ) if test_type in (u"SOAK", ): kwargs[u"boxpoints"] = u"all" + kwargs[u"jitter"] = 0.3 traces.append(plgo.Box(**kwargs)) @@ -803,6 +803,8 @@ def plot_perf_box_name(plot, input_data): try: # Create plot layout = deepcopy(plot[u"layout"]) + layout[u"xaxis"][u"tickvals"] = [i for i in range(len(y_vals))] + layout[u"xaxis"][u"ticktext"] = [str(i + 1) for i in range(len(y_vals))] if layout.get(u"title", None): if test_type in (u"HOSTSTACK", ): layout[u"title"] = f"<b>Bandwidth:</b> {layout[u'title']}" @@ -900,7 +902,6 @@ def plot_ndrpdr_box_name(plot, input_data): replace(u'2n1l-', u'') ) kwargs = dict( - x=[data_x[idx], ] * len(data_x), y=[y / 1e6 if y else None for y in vals], name=( f"{idx + 1}." @@ -915,6 +916,7 @@ def plot_ndrpdr_box_name(plot, input_data): if box_points and box_points in \ (u"all", u"outliers", u"suspectedoutliers", False): kwargs[u"boxpoints"] = box_points + kwargs[u"jitter"] = 0.3 traces.append(plgo.Box(**kwargs)) try: data_y_max.append(max(vals)) @@ -923,6 +925,9 @@ def plot_ndrpdr_box_name(plot, input_data): try: # Create plot layout = deepcopy(plot[u"layout"]) + layout[u"xaxis"][u"tickvals"] = [i for i in range(len(data_y))] + layout[u"xaxis"][u"ticktext"] = \ + [str(i + 1) for i in range(len(data_y))] if layout.get(u"title", None): layout[u"title"] = \ layout[u'title'].format(core=core, test_type=ttype) @@ -1011,18 +1016,24 @@ def plot_mrr_box_name(plot, input_data): # Add plot traces traces = list() for idx, x_item in enumerate(data_x): - traces.append( - plgo.Box( - x=[x_item, ] * len(data_y[idx]), - y=data_y[idx], - name=data_names[idx], - hoverinfo=u"y+name" - ) + kwargs = dict( + y=data_y[idx], + name=data_names[idx], + hoverinfo=u"y+name" ) + box_points = plot.get(u"boxpoints", None) + if box_points and box_points in \ + (u"all", u"outliers", u"suspectedoutliers", False): + kwargs[u"boxpoints"] = box_points + kwargs["jitter"] = 0.3 + traces.append(plgo.Box(**kwargs)) try: # Create plot layout = deepcopy(plot[u"layout"]) + layout[u"xaxis"][u"tickvals"] = [i for i in range(len(data_y))] + layout[u"xaxis"][u"ticktext"] = \ + [str(i + 1) for i in range(len(data_y))] if layout.get(u"title", None): layout[u"title"] = ( f"<b>Tput:</b> {layout[u'title'].format(core=core)}" diff --git a/resources/tools/presentation/specifications/report/environment.yaml b/resources/tools/presentation/specifications/report/environment.yaml index c7c8dbb4ce..f4ce1065f8 100644 --- a/resources/tools/presentation/specifications/report/environment.yaml +++ b/resources/tools/presentation/specifications/report/environment.yaml @@ -195,7 +195,7 @@ file-format: ".gz" enabled: False - archive-inputs: True + archive-inputs: False mapping-file: "" @@ -267,5 +267,5 @@ format: html: - full - pdf: - - minimal +# pdf: +# - minimal diff --git a/resources/tools/presentation/specifications/report/layouts.yaml b/resources/tools/presentation/specifications/report/layouts.yaml index 0f5b4a5220..ac6d29a094 100644 --- a/resources/tools/presentation/specifications/report/layouts.yaml +++ b/resources/tools/presentation/specifications/report/layouts.yaml @@ -20,7 +20,7 @@ showline: True showticklabels: True tickcolor: "rgb(220, 220, 220)" - tickmode: "linear" + tickmode: "array" tickfont: size: 14 zeroline: False @@ -106,7 +106,7 @@ showline: True showticklabels: True tickcolor: "rgb(220, 220, 220)" - tickmode: "linear" + tickmode: "array" tickfont: size: 14 zeroline: False @@ -161,7 +161,7 @@ showline: True showticklabels: True tickcolor: "rgb(220, 220, 220)" - tickmode: "linear" + tickmode: "array" tickfont: size: 14 zeroline: False @@ -216,7 +216,7 @@ showline: True showticklabels: True tickcolor: "rgb(220, 220, 220)" - tickmode: "linear" + tickmode: "array" tickfont: size: 14 zeroline: False @@ -271,7 +271,7 @@ showline: True showticklabels: True tickcolor: "rgb(220, 220, 220)" - tickmode: "linear" + tickmode: "array" tickfont: size: 14 zeroline: False |