Create script for measuring performance
This commit is contained in:
parent
d989f4f0e3
commit
d2aa7ae5bc
1 changed files with 26 additions and 0 deletions
26
aes-performance/measure.sh
Executable file
26
aes-performance/measure.sh
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
dir="${BASH_SOURCE%/*}";
|
||||||
|
|
||||||
|
for program in "aes-32bit" "aes-tboxes"
|
||||||
|
do
|
||||||
|
for flags in "-g" ""
|
||||||
|
do
|
||||||
|
if [ -z "$flags" ]
|
||||||
|
then
|
||||||
|
mode="performance";
|
||||||
|
else
|
||||||
|
mode="debug";
|
||||||
|
export CPPFLAGS="$flags";
|
||||||
|
fi;
|
||||||
|
|
||||||
|
for iterations in "1000000" "10000000"
|
||||||
|
do
|
||||||
|
echo "$program ($iterations iterations, $mode mode)";
|
||||||
|
root="$dir/$program";
|
||||||
|
make -C "$root" clean > /dev/null 2>&1;
|
||||||
|
make -C "$root" > /dev/null 2>&1;
|
||||||
|
"$dir/$program/bin/aes" "$iterations";
|
||||||
|
unset CPPFLAGS;
|
||||||
|
done;
|
||||||
|
done;
|
||||||
|
done;
|
Loading…
Reference in a new issue