aquatic_ws: add bench for InMessage::from_ws_message, take ws msg by ref

This commit is contained in:
Joakim Frostegård 2020-08-11 05:36:29 +02:00
parent 74a538963f
commit 99724c7e5d
11 changed files with 1091 additions and 5 deletions

View file

@ -0,0 +1,19 @@
#!/bin/bash
# Run benchmark, comparing against previous result.
set -e
export RUSTFLAGS="-C target-cpu=native"
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