aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_plots.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2020-09-18 10:25:09 +0200
committerTibor Frank <tifrank@cisco.com>2020-09-18 10:25:09 +0200
commitee1c6ce7dd157e141b1911dd1332aac754b0ad8f (patch)
tree07ea555c6157987c4d34eed980c6a9c59a219ceb /resources/tools/presentation/generator_plots.py
parentd6de007c3403e2ce3713f1d7bd8e0003a1e9e5f8 (diff)
Report: Fix plot_perf_box_name
Change-Id: I660819b881b1109f6f6bf250b66ba025e9278f56 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.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py
index 30e2710d87..1e21ee1562 100644
--- a/resources/tools/presentation/generator_plots.py
+++ b/resources/tools/presentation/generator_plots.py
@@ -372,14 +372,6 @@ def plot_perf_box_name(plot, input_data):
# Prepare the data for the plot
plot_title = plot.get(u"title", u"").lower()
- if u"-pdr" in plot_title:
- ttype = u"PDR"
- elif u"-ndr" in plot_title:
- ttype = u"NDR"
- else:
- raise RuntimeError(u"Wrong title. No information about test type. Add"
- u"'-ndr' or '-pdr' to the test title.")
-
if u"-gbps" in plot_title:
value = u"gbps"
multiplier = 1e6
@@ -397,6 +389,16 @@ def plot_perf_box_name(plot, input_data):
if test[u"type"] in (u"NDRPDR", ):
test_type = u"NDRPDR"
+ if u"-pdr" in plot_title:
+ ttype = u"PDR"
+ elif u"-ndr" in plot_title:
+ ttype = u"NDR"
+ else:
+ raise RuntimeError(
+ u"Wrong title. No information about test type. "
+ u"Add '-ndr' or '-pdr' to the test title."
+ )
+
y_vals[test[u"parent"]].append(
test[value][ttype][u"LOWER"] * multiplier
)