aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xb3sum/bench.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/b3sum/bench.py b/b3sum/bench.py
index 73a413c..088bf6a 100755
--- a/b3sum/bench.py
+++ b/b3sum/bench.py
@@ -1,10 +1,12 @@
#! /usr/bin/env python3
import os
+from os import path
import subprocess
import sys
import time
+HERE = path.dirname(__file__)
NUM_RUNS = 5
@@ -18,7 +20,7 @@ def one_run():
)
start = time.monotonic()
subprocess.run(
- sys.argv[1:],
+ [path.join(HERE, "target/release/b3sum")] + sys.argv[1:],
stdout=subprocess.DEVNULL,
check=True,
)
@@ -40,6 +42,11 @@ def median_run():
def main():
+ subprocess.run(
+ ["cargo", "build", "--release"],
+ check=True,
+ cwd=HERE,
+ )
t = median_run()
print()
print("{:.3f}".format(t))