experiments.sh

47 lines | 1.208 kB Blame History Raw Download
#!/bin/bash


sourcefolder="adaptive-caching-framework/evaluation/Applications/"
workloadfolder="adaptive-caching-framework/evaluation/JMeter/"

configs=("NO/" "DEV/" "AP/")

## take care of the order
applications=("CloudStore" "shopizer/sm-shop" "spring-petclinic")
databases=("CloudStore" "shopizer/sm-shop" "spring-petclinic")
workloads=("cloudscale-sustain.jmx" "Shopizer.jmx" "petclinic_test_plan.jmx")

## now loop through the above array
for config in "${configs[@]}"
do
	for application in "${applications[@]}"
	do
		echo "$sourcefolder$config$application"

		## enter the folder
		cd "$sourcefolder$config$application"


		## clean database
		## run database script

		## compile and run web server
		nohup mvn clean install tomcat7:run-war -DskipTests &>/dev/null &

		sleep 4m

		## clean jmeter results
		rm ~/Desktop/report.csv

		## run jmeter
		cd ~/dev/apache-jmeter-3.0/bin/

		./jmeter -n -t ~/Dropbox/Mestrado/Pesquisa/adaptivecaching/evaluation/JMeter/petclinic_test_plan.jmx 

		## collect results to a shared folder
		nohup mvn clean install tomcat7:run-war -DskipTests &>/dev/null &

		mv ~/Desktop/report.csv ~/Dropbox/Mestrado/Pesquisa/adaptivecaching/results/Experiments/CloudStore/ACOC-50U-OA.csv
		
	done
done