about summary refs log tree commit diff
path: root/tvix/scripts/bench.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/scripts/bench.sh')
-rwxr-xr-xtvix/scripts/bench.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/tvix/scripts/bench.sh b/tvix/scripts/bench.sh
index 5598087a0cf7..d88638701a88 100755
--- a/tvix/scripts/bench.sh
+++ b/tvix/scripts/bench.sh
@@ -1,4 +1,5 @@
-#!/usr/bin/env bash
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash ../.. -A tvix.shell
 
 # Benchmark script that runs inside the Windtunnel build agent
 
@@ -6,5 +7,12 @@ set -euo pipefail
 
 echo "Running benchmarks for tvix/eval..."
 cd "$(dirname "$(dirname "$0")")/eval"
-docker run --rm -v "$(pwd):/app" -w /app rust cargo bench
+cargo bench
 windtunnel-cli report -f criterion-rust .
+
+echo "Running tvix macrobenchmarks..."
+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