adding scripts for automating results
authoradash <adash>
Wed, 15 Nov 2006 02:05:24 +0000 (02:05 +0000)
committeradash <adash>
Wed, 15 Nov 2006 02:05:24 +0000 (02:05 +0000)
Robust/src/Benchmarks/WebServer/Workload/batch/difference.sh [new file with mode: 0755]
Robust/src/Benchmarks/WebServer/Workload/batch/pure/trans_inventory.sorted [new file with mode: 0644]
Robust/src/Benchmarks/WebServer/Workload/batch/run.sh [new file with mode: 0644]

diff --git a/Robust/src/Benchmarks/WebServer/Workload/batch/difference.sh b/Robust/src/Benchmarks/WebServer/Workload/batch/difference.sh
new file mode 100755 (executable)
index 0000000..fde42f6
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+rm result_inventory
+#For every trans_inventory* file remove the lines starting with pre and sort the file
+for file in `ls trans_inventory*`
+do
+       echo "Doing $file"
+       grep -v pre $file > ${file}.nopre
+       sort -n ${file}.nopre > runs/${file}.sorted
+done
+
+\rm *.nopre
+cd runs
+let x=0;
+#for every sorted file created above diff it with the orginial file called pure/trans_inventory.sorted and print the total success or failures occured
+for file in `ls *sorted`
+do
+       echo -n "Diffing $file...";
+       diff $file ../pure/trans_inventory.sorted
+       if [ $? -ne 0 ]
+       then
+               let "x+=1";
+       else
+               echo " success ";
+       fi
+done
+
+echo "RESULT: x is $x";
+echo -n "RESULT: Total files compared is "
+ls *sorted | wc -l 
+
+cd ..
diff --git a/Robust/src/Benchmarks/WebServer/Workload/batch/pure/trans_inventory.sorted b/Robust/src/Benchmarks/WebServer/Workload/batch/pure/trans_inventory.sorted
new file mode 100644 (file)
index 0000000..5cb507b
--- /dev/null
@@ -0,0 +1,7 @@
+
+book 258 50
+bread 9590 4
+car 39 10000
+coke 2620 5
+pen 601 5
+soap 42 7
diff --git a/Robust/src/Benchmarks/WebServer/Workload/batch/run.sh b/Robust/src/Benchmarks/WebServer/Workload/batch/run.sh
new file mode 100644 (file)
index 0000000..bed27d7
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+let i=0; #Keeps count of number of times the server is launched
+
+rm output #Errors and total number of run count are redirected to this file
+
+#Sets the BRISTLECONE parameter with a certain instruction count, probability and 
+#number of failures that can be injected
+export BRISTLECONE="-initializerandom -injectinstructionfailures 10 0.00001667 1 -debugtask"
+while [ $i -le 299 ]; # The number of runs 
+do
+       ./trans.bin & #Launch server executable in background
+       sleep 2;
+       ../../workloaderror 2>/dev/null & #Run the first workload
+       echo $i >> output;
+       sleep 5;
+       ps | grep workloaderror | grep -v grep | awk '{print $1}' | xargs kill -9 #Kill the first workload 
+       if [ $? -eq 0 ] #Launch the second worload only if the Failure is injected in the first workload
+       then
+               ../../workloadtrans 2>/dev/null
+       else
+               echo " Error occured" >> output
+       fi;
+       let "i+=1";
+       ps | grep trans | grep -v grep | awk '{print $1}' | xargs kill -9 #Kill the server 
+       sleep 1;
+done