CSIT-901: Throughput Speedup Analysis - Static content
[csit.git] / resources / tools / presentation / generator_plots.py
index 5580cbd..6665667 100644 (file)
@@ -261,13 +261,16 @@ def plot_throughput_speedup_analysis(plot, input_data):
                 except (KeyError, TypeError):
                     pass
 
                 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)
 
     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()
     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"]:
 
     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(
             y_vals_1.append(1)
             if test_vals["2"]:
                 y_vals_2.append(