From 7892c25a87c124b8d04d022c488edf05235ff704 Mon Sep 17 00:00:00 2001 From: Reiner Jung <reiner.jung@email.uni-kiel.de> Date: Wed, 27 Jul 2022 14:47:38 +0200 Subject: [PATCH] Minor fix --- frameworks/Kieker/functions.sh | 6 +++--- frameworks/common-functions.sh | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/frameworks/Kieker/functions.sh b/frameworks/Kieker/functions.sh index 8d5b281..b514bf2 100644 --- a/frameworks/Kieker/functions.sh +++ b/frameworks/Kieker/functions.sh @@ -46,15 +46,15 @@ function executeExperiment() { BENCHMARK_OPTS="${JAVA_ARGS} ${LTW_ARGS} ${KIEKER_ARGS} ${kieker_parameters}" fi - echo "Run options: ${BENCHMARK_OPTS} -jar MooBench.jar" + debug "Run options: ${BENCHMARK_OPTS} -jar MooBench.jar" - ${JAVA_BIN} ${BENCHMARK_OPTS} -jar "${BASE_DIR}/MooBench.jar" \ + "${JAVA_BIN}" ${BENCHMARK_OPTS} -jar "${BASE_DIR}/MooBench.jar" \ --application moobench.application.MonitoredClassSimple \ --output-filename "${RAWFN}-${loop}-${recursion}-${index}.csv" \ --total-calls "${TOTAL_NUM_OF_CALLS}" \ --method-time "${METHOD_TIME}" \ --total-threads 1 \ - --recursion-depth "${recursion}" &> "${RESULTS_DIR}/output_${loop}_${RECURSION_DEPTH}_${index}.txt" + --recursion-depth "${recursion}" #&> "${RESULTS_DIR}/output_${loop}_${RECURSION_DEPTH}_${index}.txt" rm -rf "${DATA_DIR}"/kieker-* diff --git a/frameworks/common-functions.sh b/frameworks/common-functions.sh index 2d95868..05c5080 100755 --- a/frameworks/common-functions.sh +++ b/frameworks/common-functions.sh @@ -75,7 +75,7 @@ function periodicallyCurlPrometheus { while [ true ] do echo "Curling for prometheus simulation..." - curl localhost:8888/metrics + curl localhost:8888/metrics sleep 15 done } @@ -108,7 +108,7 @@ function writeConfiguration() { function printIntermediaryResults { for ((index=0;index<${#TITLE[@]};index+=1)); do echo -n "Intermediary results "${TITLE[$index]}" " - cat ${RESULTS_DIR}/raw-*-${RECURSION_DEPTH}-${index}.csv | awk -F';' '{print $2}' | getSum + cat ${RAWFN}-*-${RECURSION_DEPTH}-${index}.csv | awk -F';' '{print $2}' | getSum done } @@ -143,6 +143,12 @@ function info() { echo -e "${INFO} $@" } +function debug() { + if [ "$DEBUG" == "yes" ] ; then + echo -e "${INFO} $@" + fi +} + # $1 = NAME, $2 = EXECUTABLE function checkExecutable() { if [ "$2" == "" ] ; then @@ -184,7 +190,7 @@ function checkDirectory() { exit 1 fi if [ ! -d "$2" ] ; then - if [ "$3" == "create" ] ; then + if [ "$3" == "create" ] || [ "$3" == "recreate" ] ; then info "$1: directory does not exist, creating it" mkdir -p "$2" else -- GitLab