tfcache-comparison
Details
configure 6(+3 -3)
diff --git a/configure b/configure
index 4815c82..016c2a6 100755
--- a/configure
+++ b/configure
@@ -28,7 +28,7 @@ if [ -z $1 ]; then
chmod +x /usr/local/bin/docker-compose
fi
-cd adapters; bash configure & cd ..
-cd approaches; bash configure & cd ..
-cd applications; bash configure & cd ..
+cd adapters; bash configure cd ..
+cd approaches; bash configure cd ..
+cd applications; bash configure cd ..
wait
\ No newline at end of file
reduce.sh 6(+3 -3)
diff --git a/reduce.sh b/reduce.sh
index cd0e5e9..d091366 100644
--- a/reduce.sh
+++ b/reduce.sh
@@ -33,12 +33,12 @@ for version in $versions; do
for user in 1 10 50; do
for execution in {1..10}; do
echo "Reducing $application-$version with $user users and execution $execution"
- java -jar adapters/RequestsSimulator/target/RequestsSimulator-1.0.jar --throughput=applications/output/$application-$version-${user}user-${execution}execution-requests --reduce=applications/output/requests-handled.csv --prefix=$application,$version,$user,$execution,
+ java $JAVA_OPTS -jar adapters/RequestsSimulator/target/RequestsSimulator-1.0.jar --throughput=applications/output/$application-$version-${user}user-${execution}execution-requests --reduce=applications/output/requests-handled.csv --prefix=$application,$version,$user,$execution,
if [[ $host = "localhost" ]]; then
- java -jar adapters/Cache/target/Cache-1.0.jar applications/output/$application-$version-${user}user-${execution}execution-cache applications/output/hits-distribution.csv $application,$version,$user,$execution,
+ java $JAVA_OPTS -jar adapters/Cache/target/Cache-1.0.jar applications/output/$application-$version-${user}user-${execution}execution-cache applications/output/hits-distribution.csv $application,$version,$user,$execution,
else
while ! </dev/tcp/$host/5000; do sleep 5; done
- echo "caching-approaches-comparison java -jar adapters/Cache/target/Cache-1.0.jar applications/output/$application-$version-${user}user-${execution}execution-cache applications/output/hits-distribution.csv $application,$version,$user,$execution," | netcat -w0 $host 5000
+ echo "caching-approaches-comparison java $JAVA_OPTS -jar adapters/Cache/target/Cache-1.0.jar applications/output/$application-$version-${user}user-${execution}execution-cache applications/output/hits-distribution.csv $application,$version,$user,$execution," | netcat -w0 $host 5000
fi
done
done
run.sh 56(+21 -35)
diff --git a/run.sh b/run.sh
index 9e55207..73b4780 100644
--- a/run.sh
+++ b/run.sh
@@ -20,40 +20,6 @@ if [[ ! -z $1 ]]; then
fi
fi
-echo "Checking workloads of the applications $applications"
-if [[ $applications = "*" ]]; then
- existing_applications=$(echo applications/uncached/*/)
-else
- existing_applications=$applications
-fi
-for application in $existing_applications; do
- application=${application%/}
- for user in 1 10 50; do
- if [[ ! -f applications/workloads/$application-workload-${user}user.json ]]; then
- echo "Generating workloads for $applications with $user users"
- if [[ $host = "localhost" ]]; then
- export TRACER_ENABLE=false
- docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build
- else
- while ! </dev/tcp/$host/5000; do sleep 5; done
- echo "caching-approaches-comparison export TRACER_ENABLE=false" | netcat -w0 $host 5000
- echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build" | netcat -w0 $host 5000
- fi
- while ! curl -s $host:8080 > /dev/null; do sleep 5; done
- java -jar adapters/RequestsSimulator/target/RequestsSimulator-1.0.jar --profile=applications/workloads/$application.json --time=1500000 --users=$user --log=applications/workloads/$application-workload-${user}user.json --throughput=applications/output/$application-workload-${user}user-requests --host=$host > applications/output/$application-workload-${user}user-simulator.log 2>&1
- if [[ $host = "localhost" ]]; then
- docker-compose -f applications/uncached/$application/docker-compose.yml down -v
- else
- while ! </dev/tcp/$host/5000; do sleep 5; done
- echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml down -v" | netcat -w0 $host 5000
- sleep 11
- fi
- else
- echo "Reusing workload for $application with $user users"
- fi
- done
-done
-
echo "Executing workloads in host $host for the applications $applications among the versions $versions"
for execution in {1..10}; do
for user in 1 10 50; do
@@ -67,6 +33,26 @@ for execution in {1..10}; do
echo "Running $execution execution with $user users of applications $existing_applications"
for application in $existing_applications; do
application=${application%/}
+ if [[ ! -f applications/workloads/$application-workload-${user}user.json ]]; then
+ echo "Generating workload for $application with $user users"
+ if [[ $host = "localhost" ]]; then
+ export TRACER_ENABLE=false
+ docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build
+ else
+ while ! </dev/tcp/$host/5000; do sleep 5; done
+ echo "caching-approaches-comparison export TRACER_ENABLE=false" | netcat -w0 $host 5000
+ echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build" | netcat -w0 $host 5000
+ fi
+ while ! curl -s $host:8080 > /dev/null; do sleep 5; done
+ java $JAVA_OPTS -jar adapters/RequestsSimulator/target/RequestsSimulator-1.0.jar --profile=applications/workloads/$application.json --time=1500000 --users=$user --log=applications/workloads/$application-workload-${user}user.json --throughput=applications/output/$application-workload-${user}user-requests --host=$host > applications/output/$application-workload-${user}user-simulator.log 2>&1
+ if [[ $host = "localhost" ]]; then
+ docker-compose -f applications/uncached/$application/docker-compose.yml down -v
+ else
+ while ! </dev/tcp/$host/5000; do sleep 5; done
+ echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml down -v" | netcat -w0 $host 5000
+ sleep 11
+ fi
+ fi
echo "Running $application with $user users and execution $execution"
if [[ $host = "localhost" ]]; then
export CACHE_EVENTS=/caching-approaches-comparison/applications/output/$application-$version-${user}user-${execution}execution-cache
@@ -77,7 +63,7 @@ for execution in {1..10}; do
echo "caching-approaches-comparison docker-compose -f applications/cached/$version/$application/docker-compose.yml up -d --build" | netcat -w0 $host 5000
fi
while ! curl -s $host:8080 > /dev/null; do sleep 5; done
- java -jar adapters/RequestsSimulator/target/RequestsSimulator-1.0.jar --profile=applications/workloads/$application.json --execute=applications/workloads/$application-workload-${user}user.json --throughput=applications/output/$application-$version-${user}user-${execution}execution-requests --host=$host > applications/output/$application-$version-${user}user-${execution}execution-simulator.log 2>&1
+ java $JAVA_OPTS -jar adapters/RequestsSimulator/target/RequestsSimulator-1.0.jar --profile=applications/workloads/$application.json --execute=applications/workloads/$application-workload-${user}user.json --throughput=applications/output/$application-$version-${user}user-${execution}execution-requests --host=$host > applications/output/$application-$version-${user}user-${execution}execution-simulator.log 2>&1
if [[ $host = "localhost" ]]; then
docker-compose -f applications/cached/$version/$application/docker-compose.yml down -v
else
trace.sh 3(+2 -1)
diff --git a/trace.sh b/trace.sh
index 04a3103..2780d50 100644
--- a/trace.sh
+++ b/trace.sh
@@ -19,6 +19,7 @@ fi
echo "Running in host $host for the applications: $applications"
for application in $applications; do
application=${application%/}
+ echo "Running application $application"
if [[ $host = "localhost" ]]; then
export TRACER_ENABLE=true
docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build
@@ -28,7 +29,7 @@ for application in $applications; do
echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build" | netcat -w0 $host 5000
fi
while ! curl -s $host:8080 > /dev/null; do sleep 5; done
- java -jar adapters/RequestsSimulator/target/RequestsSimulator-1.0.jar --profile=applications/workloads/$application.json --time=600000 --users=1 --log=applications/workloads/$application-execution-uncached.json --throughput=applications/output/$application-uncached-requests --host=$host > applications/output/$application-uncached-simulator.log 2>&1
+ java $JAVA_OPTS -jar adapters/RequestsSimulator/target/RequestsSimulator-1.0.jar --profile=applications/workloads/$application.json --time=600000 --users=1 --log=applications/workloads/$application-execution-uncached.json --throughput=applications/output/$application-uncached-requests --host=$host > applications/output/$application-uncached-simulator.log 2>&1
if [[ $host = "localhost" ]]; then
docker-compose -f applications/uncached/$application/docker-compose.yml down -v
else