bt2 benchmark: allow for force submit of jobs
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 30 Jul 2019 20:30:38 +0000 (16:30 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 30 Jul 2019 20:30:38 +0000 (16:30 -0400)
This will result in overwriting of results.

scripts/babeltrace-benchmark/benchmark.py

index 7ab6029f9a61863af23336ea2e5cd6c26ca8a275..f43830a9c3f5b782113aadbc1718e94fc400e4d1 100644 (file)
@@ -354,7 +354,7 @@ def generate_graph(branches, report_name, git_path):
     pdf_pages.close()
 
 
-def launch_jobs(branches, git_path, wait_for_completion, debug):
+def launch_jobs(branches, git_path, wait_for_completion, debug, force):
     """
     Lauch jobs for all missing results.
     """
@@ -365,7 +365,7 @@ def launch_jobs(branches, git_path, wait_for_completion, debug):
         with tempfile.TemporaryDirectory() as workdir:
             for commit in commits:
                 b_results = get_benchmark_results(client, commit, workdir)[0]
-                if b_results:
+                if b_results and not force:
                     continue
                 lava_submit.submit(
                     commit, wait_for_completion=wait_for_completion, debug=debug
@@ -386,6 +386,9 @@ def main():
     parser.add_argument(
         "--generate-jobs", action="store_true", help="Generate and send jobs"
     )
+    parser.add_argument(
+        "--force-jobs", action="store_true", help="Force the queueing of jobs to lava"
+    )
     parser.add_argument(
         "--do-not-wait-on-completion",
         action="store_true",
@@ -416,10 +419,16 @@ def main():
 
     if args.generate_jobs:
         print("Launching jobs for:")
+
         for branch, cutoff in bt_branches.items():
             print("\t Branch {} with cutoff {}".format(branch, cutoff))
+
         launch_jobs(
-            bt_branches, args.repo_path, not args.do_not_wait_on_completion, args.debug
+            bt_branches,
+            args.repo_path,
+            not args.do_not_wait_on_completion,
+            args.debug,
+            args.force_jobs,
         )
 
     if args.generate_report:
This page took 0.023649 seconds and 4 git commands to generate.