From d2aa7ae5bcc0afc7c468d73091e8922d065ed2cb Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 19 Dec 2023 11:55:05 +0100 Subject: [PATCH] Create script for measuring performance --- aes-performance/measure.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 aes-performance/measure.sh diff --git a/aes-performance/measure.sh b/aes-performance/measure.sh new file mode 100755 index 0000000..18c839c --- /dev/null +++ b/aes-performance/measure.sh @@ -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;