2023-12-11 04:51:43 +01:00
|
|
|
#!/usr/bin/env nix-shell
|
|
|
|
#!nix-shell -i bash ../.. -A tvix.shell
|
2023-12-05 17:58:20 +01:00
|
|
|
|
|
|
|
# Benchmark script that runs inside the Windtunnel build agent
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
echo "Running benchmarks for tvix/eval..."
|
2023-12-06 17:14:16 +01:00
|
|
|
cd "$(dirname "$(dirname "$0")")/eval"
|
2023-12-11 04:51:43 +01:00
|
|
|
cargo bench
|
2023-12-05 17:58:20 +01:00
|
|
|
windtunnel-cli report -f criterion-rust .
|
2023-12-11 04:51:43 +01:00
|
|
|
|
|
|
|
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
|