tfcache-comparison
Details
run.sh 38(+20 -18)
diff --git a/run.sh b/run.sh
index 9ff94c8..795faeb 100644
--- a/run.sh
+++ b/run.sh
@@ -40,8 +40,7 @@ for execution in {1..10}; do
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" >/dev/tcp/$host/5000
- echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build" >/dev/tcp/$host/5000
+ echo "caching-approaches-comparison export TRACER_ENABLE=false && docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build" >/dev/tcp/$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
@@ -53,23 +52,26 @@ for execution in {1..10}; do
sleep 11
fi
fi
- echo "$(date '+%F %T') 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
- docker-compose -f applications/cached/$version/$application/docker-compose.yml up -d --build
+ if [[ -f applications/output/$application-$version-${user}user-${execution}execution-requests ]]; then
+ echo "$(date '+%F %T') Skipping $application with $user users and execution $execution"
else
- while ! </dev/tcp/$host/5000; do sleep 5; done
- echo "caching-approaches-comparison export CACHE_EVENTS=/caching-approaches-comparison/applications/output/$application-$version-${user}user-${execution}execution-cache" >/dev/tcp/$host/5000
- echo "caching-approaches-comparison docker-compose -f applications/cached/$version/$application/docker-compose.yml up -d --build" >/dev/tcp/$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 --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
- while ! </dev/tcp/$host/5000; do sleep 5; done
- echo "caching-approaches-comparison docker-compose -f applications/cached/$version/$application/docker-compose.yml down -v" >/dev/tcp/$host/5000
- sleep 11
+ echo "$(date '+%F %T') 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
+ docker-compose -f applications/cached/$version/$application/docker-compose.yml up -d --build
+ else
+ while ! </dev/tcp/$host/5000; do sleep 5; done
+ echo "caching-approaches-comparison export CACHE_EVENTS=/caching-approaches-comparison/applications/output/$application-$version-${user}user-${execution}execution-cache && docker-compose -f applications/cached/$version/$application/docker-compose.yml up -d --build" >/dev/tcp/$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 --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
+ while ! </dev/tcp/$host/5000; do sleep 5; done
+ echo "caching-approaches-comparison docker-compose -f applications/cached/$version/$application/docker-compose.yml down -v" >/dev/tcp/$host/5000
+ sleep 11
+ fi
fi
done
done
trace.sh 35(+19 -16)
diff --git a/trace.sh b/trace.sh
index bfb5f6f..6b81b6a 100644
--- a/trace.sh
+++ b/trace.sh
@@ -19,22 +19,25 @@ fi
echo "$(date '+%F %T') Running in host $host for the applications: $applications"
for application in $applications; do
application=${application%/}
- echo "$(date '+%F %T') Running application $application"
- if [[ $host = "localhost" ]]; then
- export TRACER_ENABLE=true
- docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build
+ if [[ -f applications/output/$application-uncached-requests ]]; then
+ echo "$(date '+%F %T') Skipping application $application"
else
- while ! </dev/tcp/$host/5000; do sleep 5; done
- echo "caching-approaches-comparison export TRACER_ENABLE=true" >/dev/tcp/$host/5000
- echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build" >/dev/tcp/$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=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
- while ! </dev/tcp/$host/5000; do sleep 5; done
- echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml down -v" >/dev/tcp/$host/5000
- sleep 11
+ echo "$(date '+%F %T') Running application $application"
+ if [[ $host = "localhost" ]]; then
+ export TRACER_ENABLE=true
+ 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=true && docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build" >/dev/tcp/$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=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
+ while ! </dev/tcp/$host/5000; do sleep 5; done
+ echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml down -v" >/dev/tcp/$host/5000
+ sleep 11
+ fi
fi
done