aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_plots.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-01-18 15:01:00 +0100
committerTibor Frank <tifrank@cisco.com>2018-01-24 15:22:31 +0000
commitb4b7fac76d29cc780b3ccd865379ad2ed38c0586 (patch)
tree6c6698308284d4ca540b4cbbda1533328650ecce /resources/tools/presentation/generator_plots.py
parent9803b11b7b5a6df4e81fbee1da6d141b0729fc20 (diff)
CSIT-901: Throughput Speedup Analysis - Static content
- Add robustnes to the function which generates the plots - Add "Model for TSA" to LLD. Change-Id: I78dffe3622b4566b30ecac411f8ff285689d1427 Signed-off-by: Tibor Frank <tifrank@cisco.com> Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_plots.py')
-rw-r--r--resources/tools/presentation/generator_plots.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/resources/tools/presentation/generator_plots.py b/resources/tools/presentation/generator_plots.py
index 5580cbdf1c..66656679d0 100644
--- a/resources/tools/presentation/generator_plots.py
+++ b/resources/tools/presentation/generator_plots.py
@@ -261,13 +261,16 @@ def plot_throughput_speedup_analysis(plot, input_data):
except (KeyError, TypeError):
pass
+ if not throughput:
+ logging.warning("No data for the plot '{}'".
+ format(plot.get("title", "")))
+ return
+
for test_name, test_vals in throughput.items():
for key, test_val in test_vals.items():
if test_val:
throughput[test_name][key] = sum(test_val) / len(test_val)
- print(throughput)
-
names = ['1 core', '2 cores', '4 cores']
x_vals = list()
y_vals_1 = list()
@@ -276,7 +279,7 @@ def plot_throughput_speedup_analysis(plot, input_data):
for test_name, test_vals in throughput.items():
if test_vals["1"]:
- x_vals.append("-".join(test_name.split('-')[:-1]))
+ x_vals.append("-".join(test_name.split('-')[1:-1]))
y_vals_1.append(1)
if test_vals["2"]:
y_vals_2.append(