aquatic/scripts/criterion/aquatic-ws-deserialize-announce-request.sh
Joakim Frostegård 56bc028a44 aquatic_ws: OutMessage and InMessage simd-json fixes
* use simd-json in OutMessage deserialization
* take ownership in InMessage deserialization to avoid bugs
* Update benchmark results, benchmark was broken
* Compile simd-json even if simd is not on, so that rust-analyzer
  works
2020-08-11 23:02:19 +02:00

25 lines
No EOL
738 B
Bash
Executable file

#!/bin/bash
# Run benchmark, comparing against previous result.
set -e
# Compile with target-cpu=native but without AVX512 features, since they
# decrease performance.
DISABLE_AVX512=$(rustc --print target-features | grep " avx512" |
awk '{print $1}' | sed 's/^/-C target-feature=-/' | xargs)
export RUSTFLAGS="-C target-cpu=native $DISABLE_AVX512"
cargo bench --bench bench_deserialize_announce_request -- --noplot --baseline latest
read -p "Replace previous benchmark result with this one (y/N)? " answer
case ${answer:0:1} in
y|Y )
cd aquatic_ws_protocol/target/criterion/deserialize-announce-request/ &&
rm -r latest &&
mv new latest &&
echo "Replaced previous benchmark"
;;
esac