aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-07-05 19:45:41 -0400
committerFranklin Wei <me@fwei.tk>2018-07-05 19:45:41 -0400
commitfa2a0b2f0cf079695382020a8b418445dff0af97 (patch)
tree58c4cede728adaee693c0c4a633937f193fa318f
parent9aa64e1c89fae3efc92297657f2a8cf3de5b1047 (diff)
downloadcsaa-fa2a0b2f0cf079695382020a8b418445dff0af97.zip
csaa-fa2a0b2f0cf079695382020a8b418445dff0af97.tar.gz
csaa-fa2a0b2f0cf079695382020a8b418445dff0af97.tar.bz2
csaa-fa2a0b2f0cf079695382020a8b418445dff0af97.tar.xz
Update test scripts
One-liners are fun :)
-rwxr-xr-xtabulate.sh2
-rwxr-xr-xtestall.sh12
-rwxr-xr-xtestdummy.sh6
-rwxr-xr-xtestmain.sh19
4 files changed, 30 insertions, 9 deletions
diff --git a/tabulate.sh b/tabulate.sh
new file mode 100755
index 0000000..3db27e5
--- /dev/null
+++ b/tabulate.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+for i in `seq 10 62`; do for j in `seq 1 1`; do echo -n "$i $j "; cat run_"$i"_"$j".txt | awk '/Elapsed/ || /Maximum/ || /User time/ || /System time/' | awk 'BEGIN{line=0}{if(line%4<=1)printf($4" ");if(line %4==2)printf($8" ");if(line%4==3)printf($6" ");}{line+=1}END{printf("\n");}'; done; done
diff --git a/testall.sh b/testall.sh
index 122b980..dfc9972 100755
--- a/testall.sh
+++ b/testall.sh
@@ -7,12 +7,12 @@ fi
echo "Initializing..."
./server $1 csaa.db --overwrite > /dev/null &
pid=$!
-sleep 2
-time ./testcreate.sh ./client
-time ./testmodify.sh ./client
-time ./testretrieve.sh ./client
-time ./testmodifyenc.sh ./client
+sleep 1
+/usr/bin/time -v ./testcreate.sh ./client
+/usr/bin/time -v ./testmodify.sh ./client
+/usr/bin/time -v ./testretrieve.sh ./client
+/usr/bin/time -v ./testmodifyenc.sh ./client
echo "Encrypted retrieve: "
-time ./testretrieve.sh ./client
+/usr/bin/time -v ./testretrieve.sh ./client
kill -SIGINT $!
diff --git a/testdummy.sh b/testdummy.sh
index e8c4222..7050655 100755
--- a/testdummy.sh
+++ b/testdummy.sh
@@ -5,7 +5,7 @@ sqlite3 csaa.db < sqlinit.txt
./dummy_server 10 csaa.db > /dev/null &
pid=$!
sleep 1
-time ./testcreate.sh ./dummy_client
-time ./testmodify.sh ./dummy_client
-time ./testretrieve.sh ./dummy_client
+/usr/bin/time -v ./testcreate.sh ./dummy_client
+/usr/bin/time -v ./testmodify.sh ./dummy_client
+/usr/bin/time -v ./testretrieve.sh ./dummy_client
kill -SIGINT $!
diff --git a/testmain.sh b/testmain.sh
new file mode 100755
index 0000000..1bb6fc7
--- /dev/null
+++ b/testmain.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+mkdir -p results
+
+for i in `seq 1 1`
+do
+ ./testdummy.sh 2> results/dummy_$i.txt
+ sleep 1
+done
+
+for i in `seq 8 62`
+do
+ echo "logleaves "$i
+ for j in `seq 1 1`
+ do
+ ./testall.sh $i 2> results/run_"$i"_"$j".txt
+ # give time to close
+ sleep 1
+ done
+done