tfcache-comparison
Changes
adapters/clean.sh 9(+3 -6)
adapters/compile.sh 1(+1 -0)
adapters/configure 3(+2 -1)
approaches/clean.sh 5(+3 -2)
approaches/compile.sh 5(+3 -2)
approaches/configure 1(+1 -0)
configure 9(+7 -2)
docker/Dockerfile 1(+0 -1)
reduce.sh 3(+2 -1)
run.sh 40(+22 -18)
trace.sh 8(+5 -3)
Details
adapters/clean.sh 9(+3 -6)
diff --git a/adapters/clean.sh b/adapters/clean.sh
index 5cbb943..0f499aa 100644
--- a/adapters/clean.sh
+++ b/adapters/clean.sh
@@ -1,9 +1,6 @@
#!/bin/bash
-mvn -f Trace/pom.xml clean &
-mvn -f JSONSerialiser/pom.xml clean &
-mvn -f ApplicationTracer/pom.xml clean &
-mvn -f RequestsSimulator/pom.xml clean &
-mvn -f Cache/pom.xml clean &
-mvn -f java-callgraph/pom.xml clean &
+for directory in */ ; do
+ mvn -f $directory/pom.xml clean &
+done
wait
\ No newline at end of file
adapters/compile.sh 1(+1 -0)
diff --git a/adapters/compile.sh b/adapters/compile.sh
index 1d4ab4e..464497f 100644
--- a/adapters/compile.sh
+++ b/adapters/compile.sh
@@ -6,5 +6,6 @@ wait
mvn -f ApplicationTracer/pom.xml clean install -DskipTests &
mvn -f RequestsSimulator/pom.xml clean install -DskipTests &
mvn -f Cache/pom.xml clean install -DskipTests &
+mvn -f RemoteExecutor/pom.xml clean install -DskipTests &
mvn -f java-callgraph/pom.xml clean install -DskipTests &
wait
\ No newline at end of file
adapters/configure 3(+2 -1)
diff --git a/adapters/configure b/adapters/configure
index 17a244f..15b87dd 100755
--- a/adapters/configure
+++ b/adapters/configure
@@ -5,4 +5,5 @@ git clone --depth=1 https://github.com/rmeloca/ApplicationTracer.git
git clone --depth=1 https://github.com/rmeloca/JSONSerialiser.git
git clone --depth=1 https://github.com/rmeloca/Trace.git
git clone --depth=1 https://github.com/rmeloca/RequestsSimulator.git
-git clone --depth=1 https://github.com/rmeloca/Cache.git
\ No newline at end of file
+git clone --depth=1 https://github.com/rmeloca/Cache.git
+git clone --depth=1 https://github.com/rmeloca/RemoteExecutor.git
approaches/clean.sh 5(+3 -2)
diff --git a/approaches/clean.sh b/approaches/clean.sh
index 5881053..0f499aa 100644
--- a/approaches/clean.sh
+++ b/approaches/clean.sh
@@ -1,5 +1,6 @@
#!/bin/bash
-mvn -f APLCache/pom.xml clean &
-mvn -f MemoizeIt/pom.xml clean &
+for directory in */ ; do
+ mvn -f $directory/pom.xml clean &
+done
wait
\ No newline at end of file
approaches/compile.sh 5(+3 -2)
diff --git a/approaches/compile.sh b/approaches/compile.sh
index 82e4df3..d156674 100644
--- a/approaches/compile.sh
+++ b/approaches/compile.sh
@@ -1,5 +1,6 @@
#!/bin/bash
-mvn -f APLCache/pom.xml clean install -DskipTests &
-mvn -f MemoizeIt/pom.xml clean install -DskipTests &
+for directory in */ ; do
+ mvn -f $directory/pom.xml clean install -DskipTests &
+done
wait
\ No newline at end of file
approaches/configure 1(+1 -0)
diff --git a/approaches/configure b/approaches/configure
index 084720a..8fec23e 100755
--- a/approaches/configure
+++ b/approaches/configure
@@ -1,3 +1,4 @@
#!/bin/bash
+
git clone --depth=1 https://github.com/rmeloca/APLCache.git
git clone --depth=1 https://github.com/rmeloca/MemoizeIt.git
\ No newline at end of file
configure 9(+7 -2)
diff --git a/configure b/configure
index 016c2a6..02ed6aa 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,11 @@
#!/bin/bash
-if [ -z $1 ]; then
+if [ "$(whoami)" != 'root' ]; then
+ echo "You have no permission to run $0 as non-root user."
+ exit 1;
+fi
+
+if [ ! -z $1 ]; then
apt-get update -qq
apt-get -qq -y install software-properties-common
@@ -16,7 +21,7 @@ if [ -z $1 ]; then
apt-get -qq -y install oracle-java12-installer
apt-get -qq -y install maven
apt-get -qq -y install git
- apt-get -qq -y install netcat
+ apt-get -qq -y install htop
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
docker/Dockerfile 1(+0 -1)
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 6fbb33e..1e661b4 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -16,7 +16,6 @@ RUN apt-get -qq -y install oracle-java12-installer
RUN apt-get -qq -y install maven
RUN apt-get -qq -y install git
-RUN apt-get -qq -y install netcat
RUN apt-get -qq -y install curl
RUN apt-get -qq -y install htop
reduce.sh 3(+2 -1)
diff --git a/reduce.sh b/reduce.sh
index a959893..5e34f7a 100644
--- a/reduce.sh
+++ b/reduce.sh
@@ -37,7 +37,8 @@ for version in $versions; do
if [[ $host = "localhost" ]]; then
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 ! 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," >/dev/tcp/$host/5000; do sleep 5; done
+ command="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,"
+ while ! java -jar adapters/RemoteExecutor/target/RemoteExecutor-1.0.jar --send="caching-approaches-comparison $command" --host=$host --port=5000; do sleep 5; done
fi
done
done
run.sh 40(+22 -18)
diff --git a/run.sh b/run.sh
index 3d68646..e3a6394 100644
--- a/run.sh
+++ b/run.sh
@@ -21,33 +21,35 @@ if [[ ! -z $1 ]]; then
fi
echo "$(date '+%F %T') Executing workloads in host $host for the applications $applications among the versions $versions"
-for user in 1 10 50; do
- for version in $versions; do
- version=${version%/}
- if [[ $applications = "*" ]]; then
- existing_applications=$(echo applications/cached/$version/*/)
- else
- existing_applications=$applications
- fi
- echo "$(date '+%F %T') Sampling with $user users in $version version of the applications $existing_applications"
- for application in $existing_applications; do
- application=${application%/}
- for execution in {1..10}; do
+for user in 50 10 1; do
+ for execution in {1..10}; do
+ for version in $versions; do
+ version=${version%/}
+ if [[ $applications = "*" ]]; then
+ existing_applications=$(echo applications/cached/$version/*/)
+ else
+ existing_applications=$applications
+ fi
+ echo "$(date '+%F %T') Sampling with $user users in $version version of the applications $existing_applications"
+ for application in $existing_applications; do
+ application=${application%/}
if [[ ! -f applications/workloads/$application-workload-${user}user.json ]]; then
echo "$(date '+%F %T') 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 ! echo "caching-approaches-comparison export TRACER_ENABLE=false && docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build" >/dev/tcp/$host/5000; do sleep 5; done
+ command="TRACER_ENABLE=false docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build"
+ while ! java -jar adapters/RemoteExecutor/target/RemoteExecutor-1.0.jar --send="caching-approaches-comparison $command" --host=$host --port=5000; do sleep 5; done
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 ! echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml down -v" >/dev/tcp/$host/5000; do sleep 5; done
- sleep 11
+ command="docker-compose -f applications/uncached/$application/docker-compose.yml down -v"
+ while ! java -jar adapters/RemoteExecutor/target/RemoteExecutor-1.0.jar --send="caching-approaches-comparison $command" --host=$host --port=5000; do sleep 5; done
+ sleep 30
fi
fi
if [[ -f applications/output/$application-$version-${user}user-${execution}execution-requests ]]; then
@@ -58,15 +60,17 @@ for user in 1 10 50; do
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 ! 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; do sleep 5; done
+ command="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"
+ while ! java -jar adapters/RemoteExecutor/target/RemoteExecutor-1.0.jar --send="caching-approaches-comparison $command" --host=$host --port=5000; do sleep 5; done
fi
while ! curl -s $host:8080 > /dev/null; do sleep 5; done
timeout 3000 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 ! echo "caching-approaches-comparison docker-compose -f applications/cached/$version/$application/docker-compose.yml down -v" >/dev/tcp/$host/5000; do sleep 5; done
- sleep 11
+ command="docker-compose -f applications/cached/$version/$application/docker-compose.yml down -v"
+ while ! java -jar adapters/RemoteExecutor/target/RemoteExecutor-1.0.jar --send="caching-approaches-comparison $command" --host=$host --port=5000; do sleep 5; done
+ sleep 30
fi
fi
done
trace.sh 8(+5 -3)
diff --git a/trace.sh b/trace.sh
index 07191a2..9574b96 100644
--- a/trace.sh
+++ b/trace.sh
@@ -27,15 +27,17 @@ for application in $applications; do
export TRACER_ENABLE=true
docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build
else
- while ! echo "caching-approaches-comparison export TRACER_ENABLE=true && docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build" >/dev/tcp/$host/5000; do sleep 5; done
+ command="TRACER_ENABLE=true docker-compose -f applications/uncached/$application/docker-compose.yml up -d --build"
+ while ! java -jar adapters/RemoteExecutor/target/RemoteExecutor-1.0.jar --send="caching-approaches-comparison $command" --host=$host --port=5000; do sleep 5; done
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 ! echo "caching-approaches-comparison docker-compose -f applications/uncached/$application/docker-compose.yml down -v" >/dev/tcp/$host/5000; do sleep 5; done
- sleep 11
+ command="docker-compose -f applications/uncached/$application/docker-compose.yml down -v"
+ while ! java -jar adapters/RemoteExecutor/target/RemoteExecutor-1.0.jar --send="caching-approaches-comparison $command" --host=$host --port=5000; do sleep 5; done
+ sleep 30
fi
fi
done