From fef7b2e101e1aa29c1f5bbed01ac02124b268faf Mon Sep 17 00:00:00 2001
From: Reiner Jung <reiner.jung@email.uni-kiel.de>
Date: Wed, 22 Jun 2022 17:23:44 +0200
Subject: [PATCH] Minor fixes.

---
 frameworks/Kieker/benchmark.sh     | 14 +++++++-------
 frameworks/Kieker/run-benchmark.sh | 12 ++++++------
 frameworks/common-functions.sh     | 22 +++++++++++-----------
 3 files changed, 24 insertions(+), 24 deletions(-)
 mode change 100644 => 100755 frameworks/Kieker/benchmark.sh
 mode change 100644 => 100755 frameworks/Kieker/run-benchmark.sh

diff --git a/frameworks/Kieker/benchmark.sh b/frameworks/Kieker/benchmark.sh
old mode 100644
new mode 100755
index 196efed..f7ec6cb
--- a/frameworks/Kieker/benchmark.sh
+++ b/frameworks/Kieker/benchmark.sh
@@ -10,21 +10,21 @@ fi
 
 # load configuration and common functions
 if [ -f "${BASE_DIR}/config" ] ; then
-	. ${BASE_DIR}/config
+	. "${BASE_DIR}/config"
 else
 	echo "Missing configuration: ${BASE_DIR}/config"
 	exit 1
 fi
 
-if [ -f "${BASE_DIR}/common-functions.sh" ] ; then
-	. "${BASE_DIR}../common-functions.sh"
+if [ -f "${BASE_DIR}/../common-functions.sh" ] ; then
+	. "${BASE_DIR}/../common-functions.sh"
 else
 	echo "Missing configuration: ${BASE_DIR}/../common-functions.sh"
 	exit 1
 fi
 
 if [ -f "${BASE_DIR}/common-functions" ] ; then
-	. ${BASE_DIR}/common-functions
+	. "${BASE_DIR}/common-functions"
 else
 	echo "Missing configuration: ${BASE_DIR}/common-functions"
 	exit 1
@@ -33,7 +33,7 @@ fi
 getKiekerAgent
 
 PARENT=`dirname "${RESULTS_DIR}"`
-RECEIVER="${BASE_DIR}/receiver/bin/receiver"
+RECEIVER_BIN="${BASE_DIR}/receiver/bin/receiver"
 
 # check command line parameters
 if [ "$1" == "" ] ; then
@@ -52,7 +52,7 @@ fi
 checkDirectory DATA_DIR "${DATA_DIR}" create
 checkDirectory result-base "${PARENT}"
 checkFile ApsectJ-Agent "${AGENT}"
-checkExecutable Receiver "${RECEIVER}"
+checkExecutable Receiver "${RECEIVER_BIN}"
 
 information "----------------------------------"
 information "Running benchmark..."
@@ -92,7 +92,7 @@ WRITER_CONFIG[3]="-Dkieker.monitoring.enabled=true -Dkieker.monitoring.writer=ki
 WRITER_CONFIG[4]="-Dkieker.monitoring.enabled=true -Dkieker.monitoring.writer=kieker.monitoring.writer.filesystem.FileWriter -Dkieker.monitoring.writer.filesystem.FileWriter.logStreamHandler=kieker.monitoring.writer.filesystem.BinaryLogStreamHandler -Dkieker.monitoring.writer.filesystem.FileWriter.bufferSize=8192 -Dkieker.monitoring.writer.filesystem.FileWriter.customStoragePath=${DATA_DIR}/"
 WRITER_CONFIG[5]="-Dkieker.monitoring.writer=kieker.monitoring.writer.tcp.SingleSocketTcpWriter -Dkieker.monitoring.writer.tcp.SingleSocketTcpWriter.port=2345"
 #RECEIVER[5]="${BASE_DIR}/collector-2.0/bin/collector -p 2345"
-RECEIVER[5]="${RECEIVER} 2345"
+RECEIVER[5]="${RECEIVER_BIN} 2345"
 
 ## Write configuration
 uname -a >${RESULTS_DIR}/configuration.txt
diff --git a/frameworks/Kieker/run-benchmark.sh b/frameworks/Kieker/run-benchmark.sh
old mode 100644
new mode 100755
index 5090d91..796910b
--- a/frameworks/Kieker/run-benchmark.sh
+++ b/frameworks/Kieker/run-benchmark.sh
@@ -4,19 +4,19 @@ BASE_DIR=$(cd "$(dirname "$0")"; pwd)
 
 # load configuration and common functions
 if [ -f "${BASE_DIR}/config" ] ; then
-	. ${BASE_DIR}/config
+	. "${BASE_DIR}/config"
 else
 	echo "Missing configuration: ${BASE_DIR}/config"
 	exit 1
 fi
 if [ -f "${BASE_DIR}/common-functions" ] ; then
-	. ${BASE_DIR}/common-functions
+	. "${BASE_DIR}/common-functions"
 else
 	echo "Missing configuration: ${BASE_DIR}/common-functions"
 	exit 1
 fi
 if [ -f "${BASE_DIR}/../common-functions.sh" ] ; then
-	. ${BASE_DIR}/../common-functions.sh
+	. "${BASE_DIR}/../common-functions.sh"
 else
 	echo "Missing configuration: ${BASE_DIR}/../common-functions.sh"
 	exit 1
@@ -33,11 +33,11 @@ cd ${BASE_DIR}
 
 ## setup
 # install benchmark
-tar -xvpf ${BASE_DIR}/../../../benchmark/build/distributions/benchmark.tar
+tar -xvpf ${BASE_DIR}/../../benchmark/build/distributions/benchmark.tar
 # copy receiver
-tar -xvpf ${BASE_DIR}/../../../tools/receiver/build/distributions/receiver.tar
+tar -xvpf ${BASE_DIR}/../../tools/receiver/build/distributions/receiver.tar
 # copy result compiler
-tar -xvpf ${BASE_DIR}/../../../tools/compile-results/build/distributions/compile-results.tar
+tar -xvpf ${BASE_DIR}/../../tools/compile-results/build/distributions/compile-results.tar
 
 # Create benchmark results
 mkdir -p ${RESULTS_DIR}
diff --git a/frameworks/common-functions.sh b/frameworks/common-functions.sh
index 851ed67..0c09804 100644
--- a/frameworks/common-functions.sh
+++ b/frameworks/common-functions.sh
@@ -114,17 +114,17 @@ function stopBackgroundProcess {
 
 function writeConfiguration() {
 	uname -a >${RESULTS_DIR}/configuration.txt
-	${JAVA_BIN} ${JAVA_ARGS} -version 2>>${RESULTS_DIR}/configuration.txt
-	echo "JAVA_ARGS: ${JAVA_ARGS}" >>${RESULTS_DIR}/configuration.txt
-	echo "" >>${RESULTS_DIR}/configuration.txt
-	echo "Runtime: circa ${TIME} seconds" >>${RESULTS_DIR}/configuration.txt
-	echo "" >>${RESULTS_DIR}/configuration.txt
-	echo "SLEEP_TIME=${SLEEP_TIME}" >>${RESULTS_DIR}/configuration.txt
-	echo "NUM_OF_LOOPS=${NUM_OF_LOOPS}" >>${RESULTS_DIR}/configuration.txt
-	echo "TOTAL_NUM_OF_CALLS=${TOTAL_NUM_OF_CALLS}" >>${RESULTS_DIR}/configuration.txt
-	echo "METHOD_TIME=${METHOD_TIME}" >>${RESULTS_DIR}/configuration.txt
-	echo "THREADS=${THREADS}" >>${RESULTS_DIR}/configuration.txt
-	echo "RECURSION_DEPTH=${RECURSION_DEPTH}" >>${RESULTS_DIR}/configuration.txt
+	${JAVA_BIN} ${JAVA_ARGS} -version 2 >> ${RESULTS_DIR}/configuration.txt
+	echo "JAVA_ARGS: ${JAVA_ARGS}" >> ${RESULTS_DIR}/configuration.txt
+	echo "" >> ${RESULTS_DIR}/configuration.txt
+	echo "Runtime: circa ${TIME} seconds" >> ${RESULTS_DIR}/configuration.txt
+	echo "" >> ${RESULTS_DIR}/configuration.txt
+	echo "SLEEP_TIME=${SLEEP_TIME}" >> ${RESULTS_DIR}/configuration.txt
+	echo "NUM_OF_LOOPS=${NUM_OF_LOOPS}" >> ${RESULTS_DIR}/configuration.txt
+	echo "TOTAL_NUM_OF_CALLS=${TOTAL_NUM_OF_CALLS}" >> ${RESULTS_DIR}/configuration.txt
+	echo "METHOD_TIME=${METHOD_TIME}" >> ${RESULTS_DIR}/configuration.txt
+	echo "THREADS=${THREADS}" >> ${RESULTS_DIR}/configuration.txt
+	echo "RECURSION_DEPTH=${RECURSION_DEPTH}" >> ${RESULTS_DIR}/configuration.txt
 	sync
 }
 
-- 
GitLab