aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_plots.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2020-02-21 10:11:01 +0100
committerTibor Frank <tifrank@cisco.com>2020-03-03 14:54:07 +0100
commitd9bcff4067f5bc4541d12df15137bfcc297aab39 (patch)
tree338307a4b3724140e6d190f0e4e1f1be41c4f03e /resources/tools/presentation/generator_plots.py
parent1629fedabe77aef4f31ca4f3fbf5f66d1ec274dd (diff)
PAL: Process Hoststack data
Change-Id: Ib87ad83f3bbb7e71b51b91b9b3e8dc963a76a047 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_plots.py')
-rw-r--r--resources/tools/presentation/generator_plots.py25
1 files changed, 23 insertions, 2 deletions
diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py
index 5c9698912f..40993cd477 100644
--- a/resources/tools/presentation/generator_plots.py
+++ b/resources/tools/presentation/generator_plots.py
@@ -622,13 +622,14 @@ def plot_perf_box_name(plot, input_data):
f"{plot.get(u'title', u'')}."
)
data = input_data.filter_tests_by_name(
- plot, params=[u"throughput", u"parent", u"tags", u"type"])
+ plot, params=[u"throughput", u"result", u"parent", u"tags", u"type"])
if data is None:
logging.error(u"No data.")
return
# Prepare the data for the plot
y_vals = OrderedDict()
+ test_type = u""
for job in data:
for build in job:
for test in build:
@@ -639,13 +640,30 @@ def plot_perf_box_name(plot, input_data):
u"-pdr" in plot.get(u"title", u"").lower()):
y_vals[test[u"parent"]].\
append(test[u"throughput"][u"PDR"][u"LOWER"])
+ test_type = u"NDRPDR"
elif (test[u"type"] in (u"NDRPDR", ) and
u"-ndr" in plot.get(u"title", u"").lower()):
y_vals[test[u"parent"]]. \
append(test[u"throughput"][u"NDR"][u"LOWER"])
+ test_type = u"NDRPDR"
elif test[u"type"] in (u"SOAK", ):
y_vals[test[u"parent"]].\
append(test[u"throughput"][u"LOWER"])
+ test_type = u"SOAK"
+ elif test[u"type"] in (u"HOSTSTACK", ):
+ if u"LDPRELOAD" in test[u"tags"]:
+ y_vals[test[u"parent"]].append(
+ float(test[u"result"][u"bits_per_second"]) / 1e3
+ )
+ elif u"VPPECHO" in test[u"tags"]:
+ y_vals[test[u"parent"]].append(
+ (float(test[u"result"][u"client"][u"tx_data"])
+ * 8 / 1e3) /
+ ((float(test[u"result"][u"client"][u"time"]) +
+ float(test[u"result"][u"server"][u"time"])) /
+ 2)
+ )
+ test_type = u"HOSTSTACK"
else:
continue
except (KeyError, TypeError):
@@ -696,7 +714,10 @@ def plot_perf_box_name(plot, input_data):
# Create plot
layout = deepcopy(plot[u"layout"])
if layout.get(u"title", None):
- layout[u"title"] = f"<b>Throughput:</b> {layout[u'title']}"
+ if test_type in (u"HOSTSTACK", ):
+ layout[u"title"] = f"<b>Bandwidth:</b> {layout[u'title']}"
+ else:
+ layout[u"title"] = f"<b>Throughput:</b> {layout[u'title']}"
if y_max:
layout[u"yaxis"][u"range"] = [0, max(y_max)]
plpl = plgo.Figure(data=traces, layout=layout)