mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 09:45:31 +00:00
* 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
25 lines
No EOL
738 B
Bash
Executable file
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 |