formatting: black benchmark.py
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 30 Jul 2019 21:03:20 +0000 (17:03 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 30 Jul 2019 21:03:20 +0000 (17:03 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
scripts/babeltrace-benchmark/benchmark.py

index c7dc999b7b87eb9e04ba1bb61b168583d68dd056..dc1311ebcef51eeff398576e426554e8f0c0b75f 100644 (file)
@@ -204,7 +204,10 @@ def plot_raw_value(branch, benchmark_type, x_data, y_data, labels, latest_values
     plt.tight_layout()
     return
 
-def plot_delta_between_point(branch, benchmark_type, x_data, y_data, labels, latest_values):
+
+def plot_delta_between_point(
+    branch, benchmark_type, x_data, y_data, labels, latest_values
+):
     """
     Plot the graph of delta between each sequential commit.
     """
@@ -229,7 +232,10 @@ def plot_delta_between_point(branch, benchmark_type, x_data, y_data, labels, lat
 
     ax = plt.gca()
     plt.xticks(x_data, labels, rotation=90, family="monospace")
-    plt.title(graph_get_title(branch, benchmark_type) + " Delta to previous commit", fontweight="bold")
+    plt.title(
+        graph_get_title(branch, benchmark_type) + " Delta to previous commit",
+        fontweight="bold",
+    )
     plt.ylabel("Seconds")
     plt.xlabel("Latest commits")
     plt.legend()
@@ -240,6 +246,7 @@ def plot_delta_between_point(branch, benchmark_type, x_data, y_data, labels, lat
     plt.tight_layout()
     return
 
+
 def plot_ratio(branch, benchmark_type, x_data, y_data, labels, latest_values):
     """
     Plot the graph using a ratio using first point as reference (0%).
@@ -299,6 +306,7 @@ def plot_ratio(branch, benchmark_type, x_data, y_data, labels, latest_values):
     plt.tight_layout()
     return
 
+
 def generate_graph(branches, report_name, git_path):
 
     # The PDF document
@@ -359,7 +367,9 @@ def generate_graph(branches, report_name, git_path):
             pdf_pages.savefig(fig)
 
             fig = plt.figure(figsize=(width, 8.27), dpi=100)
-            plot_delta_between_point(branch, b_type, x_data, y_data, labels, latest_values)
+            plot_delta_between_point(
+                branch, b_type, x_data, y_data, labels, latest_values
+            )
             pdf_pages.savefig(fig)
 
     pdf_pages.close()
This page took 0.024064 seconds and 4 git commands to generate.