From 0211b8f4776f1de74b47228a9697764b2967c1ca Mon Sep 17 00:00:00 2001
From: Reiner Jung <reiner.jung@email.uni-kiel.de>
Date: Mon, 6 Feb 2023 16:34:31 +0100
Subject: [PATCH] Fixed many path issues. Also needed to update data.

---
 Jenkinsfile                                   |  8 ++---
 README.md                                     |  2 +-
 common-functions.sh                           |  2 +-
 frameworks/Kieker-java/benchmark.sh           |  6 ----
 frameworks/Kieker-java/runExponentialSizes.sh |  2 +-
 frameworks/Kieker-python/benchmark.sh         |  6 ----
 frameworks/OpenTelemetry-java/config.rc       |  2 +-
 frameworks/OpenTelemetry-java/functions.sh    |  2 +-
 .../OpenTelemetry-java/runExponentialSizes.sh |  2 +-
 .../inspectIT-java/runExponentialSizes.sh     |  2 +-
 run-step.sh                                   |  8 ++---
 upload.sh                                     | 32 ++++++++++---------
 12 files changed, 32 insertions(+), 42 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 0b37456..dd02b61 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -49,10 +49,10 @@ pipeline {
           sh './frameworks/OpenTelemetry-java/benchmark.sh'
           sh './frameworks/inspectIT-java/benchmark.sh'
 
-          sh 'cp frameworks/Kieker-python/results-Kieker-python/results.yaml kieker-python-results.yaml'
-          sh 'cp frameworks/Kieker-java/results-Kieker-java/results.yaml kieker-java-results.yaml'
-          sh 'cp frameworks/OpenTelemetry-java/results-OpenTelemetry-java/results.yaml open-telementry-results.yaml'
-          sh 'cp frameworks/inspectIT-java/results-inspectIT-java/results.yaml inspect-it-results.yaml'
+          sh 'cp frameworks/Kieker-python/results/results.yaml Kieker-python-results.yaml'
+          sh 'cp frameworks/Kieker-java/results/results.yaml Kieker-java-results.yaml'
+          sh 'cp frameworks/OpenTelemetry-java/results/results.yaml OpenTelemetry-java-results.yaml'
+          sh 'cp frameworks/inspectIT-java/results/results.yaml inspectIT-java-results.yaml'
 
           stash includes: '*-results.yaml', name: 'yaml'
        }
diff --git a/README.md b/README.md
index 4b24bb2..987e8b9 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ For all combinations of supported monitoring frameworks $FRAMEWORK and languages
 - docker = Dockerfile to be used in automated runs on our intrestructure
 - frameworks = benchmark setups for the different frameworks
   - Kieker
-  - OpenTelementry
+  - OpenTelemetry
   - SPASSmeter
   - inspectIT
 - gradle = build system, gradle libraries
diff --git a/common-functions.sh b/common-functions.sh
index e3fa0fd..560c4cb 100755
--- a/common-functions.sh
+++ b/common-functions.sh
@@ -245,7 +245,7 @@ function showParameter() {
 }
 
 FRAMEWORK_NAME=$(basename -- "${BASE_DIR}")
-RESULTS_DIR="${BASE_DIR}/results-${FRAMEWORK_NAME}"
+RESULTS_DIR="${BASE_DIR}/results"
 RAWFN="${RESULTS_DIR}/raw"
 
 # Initialize all unset parameters
diff --git a/frameworks/Kieker-java/benchmark.sh b/frameworks/Kieker-java/benchmark.sh
index 07852d1..bf77991 100755
--- a/frameworks/Kieker-java/benchmark.sh
+++ b/frameworks/Kieker-java/benchmark.sh
@@ -63,12 +63,6 @@ info "----------------------------------"
 info "Setup..."
 info "----------------------------------"
 
-# This is necessary, as the framework name is originally
-# derived from the directory the script is sitting in, but
-# Kieker supports multiple languages and has multiple
-# sub directories for each programming language.
-export FRAMEWORK_NAME="kieker-${FRAMEWORK_NAME}"
-
 cd "${BASE_DIR}"
 
 # load agent
diff --git a/frameworks/Kieker-java/runExponentialSizes.sh b/frameworks/Kieker-java/runExponentialSizes.sh
index d773ba6..32271bd 100755
--- a/frameworks/Kieker-java/runExponentialSizes.sh
+++ b/frameworks/Kieker-java/runExponentialSizes.sh
@@ -14,7 +14,7 @@ else
 	exit 1
 fi
 
-RESULTS_DIR="${BASE_DIR}/results-Kieker-java"
+RESULTS_DIR="${BASE_DIR}/exp-results"
 
 #
 # checks
diff --git a/frameworks/Kieker-python/benchmark.sh b/frameworks/Kieker-python/benchmark.sh
index 6330271..6396299 100755
--- a/frameworks/Kieker-python/benchmark.sh
+++ b/frameworks/Kieker-python/benchmark.sh
@@ -55,12 +55,6 @@ info "----------------------------------"
 info "Setup..."
 info "----------------------------------"
 
-# This is necessary, as the framework name is originally
-# derived from the directory the script is sitting in, but
-# Kieker supports multiple languages and has multiple
-# sub directories for each programming language.
-export FRAMEWORK_NAME="kieker-${FRAMEWORK_NAME}"
-
 cd "${BASE_DIR}"
 
 # load agent
diff --git a/frameworks/OpenTelemetry-java/config.rc b/frameworks/OpenTelemetry-java/config.rc
index 9c6923e..d0978c4 100644
--- a/frameworks/OpenTelemetry-java/config.rc
+++ b/frameworks/OpenTelemetry-java/config.rc
@@ -1,4 +1,4 @@
-# OpenTelementry configuration
+# OpenTelemetry configuration
 
 source ${MAIN_DIR}/config.rc
 
diff --git a/frameworks/OpenTelemetry-java/functions.sh b/frameworks/OpenTelemetry-java/functions.sh
index 10e7cae..eb6a4d2 100644
--- a/frameworks/OpenTelemetry-java/functions.sh
+++ b/frameworks/OpenTelemetry-java/functions.sh
@@ -1,4 +1,4 @@
-# OpenTelementry specific functions
+# OpenTelemetry specific functions
 
 # ensure the script is sourced
 if [ "${BASH_SOURCE[0]}" -ef "$0" ]
diff --git a/frameworks/OpenTelemetry-java/runExponentialSizes.sh b/frameworks/OpenTelemetry-java/runExponentialSizes.sh
index 73f66d5..b680595 100755
--- a/frameworks/OpenTelemetry-java/runExponentialSizes.sh
+++ b/frameworks/OpenTelemetry-java/runExponentialSizes.sh
@@ -14,7 +14,7 @@ else
 	exit 1
 fi
 
-RESULTS_DIR="${BASE_DIR}/results-OpenTelemetry"
+RESULTS_DIR="${BASE_DIR}/exp-results"
 
 #
 # checks
diff --git a/frameworks/inspectIT-java/runExponentialSizes.sh b/frameworks/inspectIT-java/runExponentialSizes.sh
index f0a8fc0..b680595 100755
--- a/frameworks/inspectIT-java/runExponentialSizes.sh
+++ b/frameworks/inspectIT-java/runExponentialSizes.sh
@@ -14,7 +14,7 @@ else
 	exit 1
 fi
 
-RESULTS_DIR="${BASE_DIR}/results-inspectIT"
+RESULTS_DIR="${BASE_DIR}/exp-results"
 
 #
 # checks
diff --git a/run-step.sh b/run-step.sh
index bb88e48..6d847fd 100755
--- a/run-step.sh
+++ b/run-step.sh
@@ -6,10 +6,10 @@
 ./frameworks/inspectIT-java/benchmark.sh || exit
 
 echo "copy"
-cp -v frameworks/Kieker-python/results-Kieker-python/results.yaml kieker-python-results.yaml
-cp -v frameworks/Kieker-java/results-Kieker-java/results.yaml kieker-java-results.yaml
-cp -v frameworks/OpenTelemetry-java/results-OpenTelemetry-java/results.yaml open-telementry-results.yaml
-cp -v frameworks/inspectIT-java/results-inspectIT-java/results.yaml inspect-it-results.yaml
+cp -v frameworks/Kieker-python/results/results.yaml Kieker-python-results.yaml
+cp -v frameworks/Kieker-java/results/results.yaml Kieker-java-results.yaml
+cp -v frameworks/OpenTelemetry-java/results/results.yaml OpenTelemetry-java-results.yaml
+cp -v frameworks/inspectIT-java/results/results.yaml inspectIT-java-results.yaml
 
 # end
 
diff --git a/upload.sh b/upload.sh
index ca42b03..daf6d3f 100755
--- a/upload.sh
+++ b/upload.sh
@@ -37,34 +37,36 @@ fi
 
 checkExecutable compile-results "${COMPILE_RESULTS_BIN}"
 checkFile keystore "${KEYSTORE}"
+checkDirectory results "${BASE_DIR}/results" recreate
 
 if [ "${UPDATE_SITE_URL}" == "" ] ; then
 	error "Missing UPDATE_SITE_URL"
-	information "Usage: $0 KEYSTORE UPDATE_SITE_URL"
+	info "Usage: $0 KEYSTORE UPDATE_SITE_URL"
 	exit 1
 fi
 
 # Retrieve logs
-information "Get Kieker-java log"
-
-mkdir results
 cd results
-sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}/kieker-java-log.yaml
-information "Get Kieker-python log"
-sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}/kieker-python-log.yaml
-information "Get OpenTelemetry log"
-sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}/OpenTelemetry-log.yaml
-information "Get inspectIT log"
-sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}/inspectIT-log.yaml
+
+info "Get Kieker-java log"
+sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}/Kieker-java-log.yaml
+
+info "Get Kieker-python log"
+sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}/Kieker-python-log.yaml
+
+info "Get OpenTelemetry log"
+sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}/OpenTelemetry-java-log.yaml
+
+info "Get inspectIT log"
+sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}/inspectIT-java-log.yaml
 cd ..
-information "Logs retrieved"
 
 # Compute logs and charts
-information "Compute new logs and charts"
+info "Compute new logs and charts"
 "${COMPILE_RESULTS_BIN}" -i *-results.yaml -l results -c results -t results -w 100
 
 # Stash results back onto the update site
-information "Push logs and results"
+info "Push logs and results"
 
 cd results
 echo "put *.yaml" | sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo  -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}
@@ -72,5 +74,5 @@ echo "put *.html" | sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyC
 echo "put *.json" | sftp -oNoHostAuthenticationForLocalhost=yes -oStrictHostKeyChecking=no -oUser=repo  -F /dev/null -i ${KEYSTORE} ${UPDATE_SITE_URL}
 cd ..
 
-information "Done"
+info "Done"
 # end
-- 
GitLab