added fancy benchmark
authorMart Lubbers <mart@martlubbers.net>
Sat, 12 Mar 2016 16:33:45 +0000 (17:33 +0100)
committerMart Lubbers <mart@martlubbers.net>
Sat, 12 Mar 2016 16:33:45 +0000 (17:33 +0100)
code/.gitignore
code/fancy_benchmark.sh [new file with mode: 0755]

index 6c83100..b4022a0 100644 (file)
@@ -2,3 +2,4 @@ Clean System Files
 a.out
 SokobanObjectwise
 *.prj
+NuSMV
diff --git a/code/fancy_benchmark.sh b/code/fancy_benchmark.sh
new file mode 100755 (executable)
index 0000000..63e24cb
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+echo -e "screen\tboxes\tseconds"
+find ../sokobanzip/screens/ -type f | xargs -I{} \
+       bash -c 'echo -ne "{}\t" && grep -o "[*$]" {} | wc -l' | sort -k2 -nr |\
+       tac | cut -f1 | xargs -I{} bash -c \
+               'S1=`date +%s`; 
+               ./NuSMV <(<{} ./SokobanObjectwise) 2>&1>/dev/null;
+               S2=`date +%s`;
+               echo -e "$(basename {})\t$(grep -o "[*$]" {} | wc -l)\t$((S2-S1))"'