diff --git a/build.py b/build.py index d654c0d38b..0ee53ec667 100755 --- a/build.py +++ b/build.py @@ -69,10 +69,10 @@ ) parser.add_argument( - "--ci-bench", - action=argparse.BooleanOptionalAction, - default=False, - help="Run the benchmarking script that is run in CI (default is --no-ci-bench)", + "--ci-bench", + action=argparse.BooleanOptionalAction, + default=False, + help="Run the benchmarking script that is run in CI (default is --no-ci-bench)", ) args = parser.parse_args() @@ -303,46 +303,25 @@ def run_python_integration_tests(cwd, interpreter): def run_ci_historic_benchmark(): branch = "main" output = subprocess.check_output( - [ - "git", - "rev-list", - "--since=1 week ago", - "--pretty=format:%ad__%h", - "--date=short", - branch, - ] + ["git", "rev-list", "--since=1 week ago", "--pretty=format:%ad__%h", "--date=short", branch] ).decode("utf-8") - print("\n".join([line for i, line in enumerate(output.split("\n")) if i % 2 == 1])) + print('\n'.join([line for i, line in enumerate(output.split('\n')) if i % 2 == 1])) output = subprocess.check_output( - [ - "git", - "rev-list", - "--since=1 week ago", - "--pretty=format:%ad__%h", - "--date=short", - branch, - ] + ["git", "rev-list", "--since=1 week ago", "--pretty=format:%ad__%h", "--date=short", branch] ).decode("utf-8") - date_and_commits = [line for i, line in enumerate(output.split("\n")) if i % 2 == 1] + date_and_commits = [line for i, line in enumerate(output.split('\n')) if i % 2 == 1] for date_and_commit in date_and_commits: print("benching commit", date_and_commit) result = subprocess.run( - [ - "cargo", - "criterion", - "--message-format=json", - "--history-id", - date_and_commit, - ], + ["cargo", "criterion", "--message-format=json", "--history-id", date_and_commit], capture_output=True, - text=True, + text=True ) with open(f"{date_and_commit}.json", "w") as f: f.write(result.stdout) - if build_pip: step_start("Building the pip package")