summaryrefslogtreecommitdiff
path: root/test.sh
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2016-01-07 00:44:01 +0100
committerFlorian Jung <flo@windfisch.org>2016-01-07 00:44:01 +0100
commita7763a22a08117dca62a6e9616ecea33fe7e4c65 (patch)
tree92d0340418bdc9326479f0f01ca58d1226fdd5f6 /test.sh
parentf9a9a51884aadef97b8952b2807541d31b7e9917 (diff)
doc
Diffstat (limited to 'test.sh')
-rw-r--r--test.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/test.sh b/test.sh
new file mode 100644
index 0000000..f79c56d
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+name=$1
+num=$2
+shift 2
+
+mkdir -p derivs
+mkdir -p logs
+mkdir -p logtmp
+
+for ((i=0;i<$num;i++)); do
+ if [ ! -e logtmp/$name.$i.log ]; then
+ python sol.py $@ --file logtmp/$name.$i.log
+ fi
+done
+
+python avg.py logs/$name.log logtmp/$name.*.log
+python shift.py logs/$name.log 50 > derivs/$name.log
+
+echo "plot 'logs/$name.log' with lines" > $name.gnuplot
+echo "pause -1" >> $name.gnuplot
+echo "plot 'derivs/$name.log' with lines" > $name.d.gnuplot
+echo "pause -1" >> $name.d.gnuplot