tfcache-comparison
Details
run.sh 27(+11 -16)
diff --git a/run.sh b/run.sh
index d8dff02..7a9e813 100644
--- a/run.sh
+++ b/run.sh
@@ -1,15 +1,15 @@
#!/bin/bash
if [ "$(whoami)" != 'root' ]; then
- echo "You have no permission to run $0 as non-root user."
- exit 1;
+ echo "You have no permission to run $0 as non-root user."
+ exit 1;
fi
export JAVA_OPTS="-Xms4096m -Xmx6124m"
host="localhost"
versions="uncached developers aplcache memoizeit"
-applications="*"
+applications=$(echo applications/uncached/*/)
if [[ ! -z $1 ]]; then
host=$1
if [[ ! -z $2 ]]; then
@@ -21,20 +21,15 @@ 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 25 5 1; do
- for execution in {1..10}; do
+for application in $applications; do
+ application=${application%/}
+ for user in 25 5 1; do
for version in $versions; do
version=${version%/}
- if [[ $applications = "*" ]]; then
- existing_applications=$(echo applications/$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%/}
+ echo "$(date '+%F %T') Sampling $application with $user users in $version version"
+ for execution in {1..10}; do
if [[ ! -f applications/workloads/$application-workload-${user}user.json ]]; then
- echo "$(date '+%F %T') Generating workload for $application with $user users"
+ 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
@@ -53,9 +48,9 @@ for user in 25 5 1; do
fi
fi
if [[ -f applications/output/$application-$version-${user}user-${execution}execution-requests ]]; then
- echo "$(date '+%F %T') Skipping $application with $user users and execution $execution"
+ echo "$(date '+%F %T') Skipping $application with $user users and execution $execution"
else
- echo "$(date '+%F %T') Running $application with $user users and execution $execution"
+ echo "$(date '+%F %T') Running $application with $user users and execution $execution"
if [[ $host = "localhost" ]]; then
export TRACER_ENABLE=false
export CACHE_EVENTS=/caching-approaches-comparison/applications/output/$application-$version-${user}user-${execution}execution-cache
trace.sh 4(+2 -2)
diff --git a/trace.sh b/trace.sh
index 795521c..9dcf0d7 100644
--- a/trace.sh
+++ b/trace.sh
@@ -1,8 +1,8 @@
#!/bin/bash
if [ "$(whoami)" != 'root' ]; then
- echo "You have no permission to run $0 as non-root user."
- exit 1;
+ echo "You have no permission to run $0 as non-root user."
+ exit 1;
fi
export JAVA_OPTS="-Xms4096m -Xmx6124m"