about summary refs log tree commit diff
path: root/tvix/scripts
diff options
context:
space:
mode:
authorAspen Smith <grfn@gws.fyi>2023-12-11T04·09-0500
committerclbot <clbot@tvl.fyi>2023-12-11T04·13+0000
commitd9ac36d3078dfadbdb1a3e2372fdd878d9369b8f (patch)
tree463d68641cc5ee5deca8b74cc738320de924ca6c /tvix/scripts
parent01a3c87a3ab1b7df6045f5a32746c340b7e4ad3a (diff)
fix(tvix): Fix cwd in benchmark script r/7147
Change-Id: I6d9435c6710ce086aaedb2c1dc634b73a19f476c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10249
Tested-by: BuildkiteCI
Autosubmit: grfn <grfn@gws.fyi>
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/scripts')
-rwxr-xr-xtvix/scripts/bench.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tvix/scripts/bench.sh b/tvix/scripts/bench.sh
index d88638701a88..548a9d2058d3 100755
--- a/tvix/scripts/bench.sh
+++ b/tvix/scripts/bench.sh
@@ -6,13 +6,16 @@
 set -euo pipefail
 
 echo "Running benchmarks for tvix/eval..."
-cd "$(dirname "$(dirname "$0")")/eval"
+pushd "$(dirname "$(dirname "$0")")/eval"
 cargo bench
 windtunnel-cli report -f criterion-rust .
+popd
 
 echo "Running tvix macrobenchmarks..."
+pushd "$(dirname "$(dirname "$0")")"
 cargo build --release --bin tvix
 hyperfine --export-json ./results.json \
     -n 'eval-nixpkgs-hello' "target/release/tvix -E '(import ../../nixpkgs {}).hello.outPath'" \
     -n 'eval-nixpkgs-cross-hello' "target/release/tvix -E '(import ../../nixpkgs {}).pkgsCross.aarch64-multiplatform.hello.outPath'"
 windtunnel-cli report -f hyperfine-json ./results.json
+popd