Add babeltrace benchmark commit skip
[lttng-ci.git] / scripts / babeltrace-benchmark / benchmark.py
index c7dc999b7b87eb9e04ba1bb61b168583d68dd056..901772581bd20e8c218b02e41720cb39985bb214 100644 (file)
@@ -38,6 +38,17 @@ from minio.error import ResponseError
 BENCHMARK_TYPES = ["dummy", "text"]
 DEFAULT_BUCKET = "lava"
 
+invalid_commits = {
+        "ec9a9794af488a9accce7708a8b0d8188b498789", # Does not build
+        "8c99128c640cbce71fb8a6caa15e4c672252b662", # Block on configure
+        "f3847c753f1b4f12353c38d97b0577d9993d19fb", # Does not build
+        "e0111295f17ddfcc33ec771a8deac505473a06ad", # Does not build
+        "d0d4e0ed487ea23aaf0d023513c0a4d86901b79b", # Does not build
+        "c24f7ab4dd9edeb5e50b0070fd9d9e8691057dde", # Does not build
+        "ce67f5614a4db3b2de4d887eca52135b439b4937", # Does not build
+        "80aff5efc66679fd934cef433c0e698694748385", # Does not build
+        "f4f11e84942d36fcc8a597d226928bce2ccac4b3", # Does not build
+        }
 
 def json_type(string):
     """
@@ -197,6 +208,7 @@ def plot_raw_value(branch, benchmark_type, x_data, y_data, labels, latest_values
     plt.ylabel("User + system time (s)")
     plt.xlabel("Latest commits")
     plt.legend()
+    plt.grid(True)
 
     # Put tick on the right side
     ax.tick_params(labeltop=False, labelright=True)
@@ -204,7 +216,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,10 +244,14 @@ 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()
+    plt.grid(True)
 
     # Put tick on the right side
     ax.tick_params(labeltop=False, labelright=True)
@@ -240,6 +259,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%).
@@ -292,6 +312,7 @@ def plot_ratio(branch, benchmark_type, x_data, y_data, labels, latest_values):
     plt.ylabel("Ratio")
     plt.xlabel("Latest commits")
     plt.legend()
+    plt.grid(True)
 
     # Put tick on the right side
     ax.tick_params(labeltop=False, labelright=True)
@@ -299,6 +320,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 +381,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()
@@ -375,6 +399,8 @@ def launch_jobs(branches, git_path, wait_for_completion, debug, force):
 
         with tempfile.TemporaryDirectory() as workdir:
             for commit in commits:
+                if commit in invalid_commits:
+                    continue
                 b_results = get_benchmark_results(client, commit, workdir)[0]
                 if b_results and not force:
                     continue
This page took 0.023582 seconds and 4 git commands to generate.