diff --git a/tools/benchmark.py b/tools/benchmark.py index c9b9823de9..c9a3e02432 100755 --- a/tools/benchmark.py +++ b/tools/benchmark.py @@ -169,10 +169,10 @@ def main(argv): os.chdir(root_path) import_data_from_gh_pages() - prebuilt.load_hyperfine() + hyperfine = prebuilt.load_hyperfine() run([ - "hyperfine", "--ignore-failure", "--export-json", benchmark_file, + hyperfine, "--ignore-failure", "--export-json", benchmark_file, "--warmup", "3" ] + [ deno_path + " " + " ".join(args) for [_, args] in exec_time_benchmarks diff --git a/tools/prebuilt.py b/tools/prebuilt.py index 69dcefdfdd..591cfc6649 100644 --- a/tools/prebuilt.py +++ b/tools/prebuilt.py @@ -31,8 +31,10 @@ def load_sccache(): def load_hyperfine(): if sys.platform == 'win32': - download_prebuilt("prebuilt/win/hyperfine.exe.sha1") + p = "prebuilt/win/hyperfine.exe" elif sys.platform.startswith('linux'): - download_prebuilt("prebuilt/linux64/hyperfine.sha1") + p = "prebuilt/linux64/hyperfine" elif sys.platform == 'darwin': - download_prebuilt("prebuilt/mac/hyperfine.sha1") + p = "prebuilt/mac/hyperfine" + download_prebuilt(p + ".sha1") + return os.path.join(root_path, p)