Browse Source

More refined and parametrized bloat capture scripts

Signed-off-by: Daniel Egger <daniel@eggers-club.de>
trying.tmp
Daniel Egger 3 years ago
parent
commit
63778e9479
  1. 15
      tools/capture_example_bloat.sh
  2. 22
      tools/capture_nightly_example_bloat.sh

15
tools/capture_example_bloat.sh

@ -1,7 +1,12 @@
#!/bin/bash
filename="bloat_log_"`date -Iminutes`".txt"
filenamenoopt="bloat_noopt_log_"`date -Iminutes`".txt"
version="stable"
filename="bloat_log_"$version"_"`date -Iminutes`".txt"
filenamenoopt="bloat_noopt_log_"$version"_"`date -Iminutes`".txt"
cargo +$version rustc -- -V >>$filename
cargo +$version rustc -- -V >>$filenamenoopt
for i in `find examples -name "*.rs"`; do
name=$(echo $i | sed -e "s,examples/,,g" -e "s,\.rs,,g")
@ -10,8 +15,8 @@ for i in `find examples -name "*.rs"`; do
echo >>$filenamenoopt
echo "Bloat for example $name" >>$filename
echo "Bloat for example $name" >>$filenamenoopt
cargo bloat --release --example $name --features="stm32f042,rt" -n 60 >>$filename
cargo bloat --example $name --features="stm32f042,rt" -n 60 >>$filenamenoopt
cargo +$version bloat --release --example $name --features="stm32f042,rt" -n 60 >>$filename
cargo +$version bloat --example $name --features="stm32f042,rt" -n 60 >>$filenamenoopt
done
echo "Captures bloat for all examples into $filename"
echo "Captured bloat for rustc version \"$version\" for all examples into $filename and $filenamenoopt"

22
tools/capture_nightly_example_bloat.sh

@ -0,0 +1,22 @@
#!/bin/bash
version="nightly"
filename="bloat_log_"$version"_"`date -Iminutes`".txt"
filenamenoopt="bloat_noopt_log_"$version"_"`date -Iminutes`".txt"
cargo +$version rustc -- -V >>$filename
cargo +$version rustc -- -V >>$filenamenoopt
for i in `find examples -name "*.rs"`; do
name=$(echo $i | sed -e "s,examples/,,g" -e "s,\.rs,,g")
echo "Processing example $name"
echo >>$filename
echo >>$filenamenoopt
echo "Bloat for example $name" >>$filename
echo "Bloat for example $name" >>$filenamenoopt
cargo +$version bloat --release --example $name --features="stm32f042,rt" -n 60 >>$filename
cargo +$version bloat --example $name --features="stm32f042,rt" -n 60 >>$filenamenoopt
done
echo "Captured bloat for rustc version \"$version\" for all examples into $filename and $filenamenoopt"
Loading…
Cancel
Save