diff --git a/common-functions.sh b/common-functions.sh index b21d08481e486d44c2d7925f1efad94033e1b37f..e3fa0fd081f7869d8006e5bdcbd190fac1da6326 100755 --- a/common-functions.sh +++ b/common-functions.sh @@ -113,9 +113,17 @@ EOF } function printIntermediaryResults { + loop="$1" for ((index=0;index<${#TITLE[@]};index+=1)); do + RESULT_FILE="${RAWFN}-${loop}-${RECURSION_DEPTH}-${index}.csv" + checkFile result "${RESULT_FILE}" + raw_length=`cat "${RESULT_FILE}" | wc -l` + if [ "${raw_length}" == "0" ] ; then + error "Result file '${RESULT_FILE}' is empty." + exit 1 + fi info_n "Intermediary results "${TITLE[$index]}" " - cat ${RAWFN}-*-${RECURSION_DEPTH}-${index}.csv | awk -F';' '{print $2}' | getSum + cat "${RESULT_FILE}" | awk -F';' '{print $2}' | getSum done } @@ -142,6 +150,9 @@ fi function error() { echo -e "${ERROR} $@" + if [ "${_STOP_ON_ERROR}" == "true" ] ; then + exit 1 + fi } function warn() { diff --git a/config.rc b/config.rc index 9a7859b1eccca833856dcd11e7256febca0f8e21..554570004a0b7a55b95dd022b791bc325cd6ddc8 120000 --- a/config.rc +++ b/config.rc @@ -1 +1 @@ -experiment.rc \ No newline at end of file +test.rc \ No newline at end of file diff --git a/frameworks/Kieker-java/benchmark.sh b/frameworks/Kieker-java/benchmark.sh index 84456b25f69c69c7938217c2148b93565f8d53e5..b2da6be9b6448030b5f4d23a82792e233e269f0b 100755 --- a/frameworks/Kieker-java/benchmark.sh +++ b/frameworks/Kieker-java/benchmark.sh @@ -7,6 +7,7 @@ # configure base dir BASE_DIR=$(cd "$(dirname "$0")"; pwd) +MAIN_DIR="${BASE_DIR}/../.." # # source functionality @@ -17,8 +18,6 @@ if [ ! -d "${BASE_DIR}" ] ; then exit 1 fi -MAIN_DIR="${BASE_DIR}/../.." - if [ -f "${MAIN_DIR}/common-functions.sh" ] ; then source "${MAIN_DIR}/common-functions.sh" else @@ -134,8 +133,7 @@ for ((i=1;i<="${NUM_OF_LOOPS}";i+=1)); do echo "## Starting iteration ${i}/${NUM_OF_LOOPS}" >> "${DATA_DIR}/kieker.log" executeBenchmark - - printIntermediaryResults + printIntermediaryResults "${i}" done # Create R labels diff --git a/frameworks/Kieker-java/functions.sh b/frameworks/Kieker-java/functions.sh index 2492207b3a7a15cae55645980875ed0cfb072664..676a99cbe3ad9cec7ec9cf90f5177090d95edbba 100644 --- a/frameworks/Kieker-java/functions.sh +++ b/frameworks/Kieker-java/functions.sh @@ -50,14 +50,29 @@ function executeExperiment() { debug "Run options: ${BENCHMARK_OPTS}" + RESULT_FILE="${RAWFN}-${loop}-${recursion}-${index}.csv" + LOG_FILE="${RESULTS_DIR}/output_${loop}_${RECURSION_DEPTH}_${index}.txt" + "${MOOBENCH_BIN}" \ --application moobench.application.MonitoredClassSimple \ - --output-filename "${RAWFN}-${loop}-${recursion}-${index}.csv" \ + --output-filename "${RESULT_FILE}" \ --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}" &> "${LOG_FILE}" + if [ ! -f "${RESULT_FILE}" ] ; then + info "---------------------------------------------------" + cat "${LOG_FILE}" + error "Result file '${RESULT_FILE}' is empty." + else + size=`wc -c "${RESULT_FILE}" | awk '{ print $1 }'` + if [ "${size}" == "0" ] ; then + info "---------------------------------------------------" + cat "${LOG_FILE}" + error "Result file '${RESULT_FILE}' is empty." + fi + fi rm -rf "${DATA_DIR}"/kieker-* [ -f "${DATA_DIR}/hotspot.log" ] && mv "${DATA_DIR}/hotspot.log" "${RESULTS_DIR}/hotspot-${loop}-${recursion}-${index}.log" diff --git a/frameworks/Kieker-python/benchmark.sh b/frameworks/Kieker-python/benchmark.sh index ca0f175815498d11c110185175f47b93897d4080..f2424d1b3dfc73479b8c69b14dff4faeff246fd8 100755 --- a/frameworks/Kieker-python/benchmark.sh +++ b/frameworks/Kieker-python/benchmark.sh @@ -140,7 +140,7 @@ for ((i=1;i<=${NUM_OF_LOOPS};i+=1)); do tcpLogging 7 $i 1 tcpLogging 8 $i 2 - printIntermediaryResults + printIntermediaryResults "${i}" done # Create R labels diff --git a/frameworks/OpenTelemetry-java/benchmark.sh b/frameworks/OpenTelemetry-java/benchmark.sh index 470410f695198db766bf98c2d7c4a7ceb84a036f..e19adf3369c3f2e2280ebb490a76e714bf68dbd0 100755 --- a/frameworks/OpenTelemetry-java/benchmark.sh +++ b/frameworks/OpenTelemetry-java/benchmark.sh @@ -114,7 +114,7 @@ for ((i=1;i<=${NUM_OF_LOOPS};i+=1)); do runOpenTelemetryPrometheus cleanup - printIntermediaryResults + printIntermediaryResults "${i}" done # Create R labels diff --git a/frameworks/inspectIT-java/benchmark.sh b/frameworks/inspectIT-java/benchmark.sh index 4ae88fa3270b27a0799af753162fc1633ea6d889..a4da36b5268e0ac0194d1c2f680b406356599942 100755 --- a/frameworks/inspectIT-java/benchmark.sh +++ b/frameworks/inspectIT-java/benchmark.sh @@ -111,7 +111,7 @@ for ((i=1;i<=${NUM_OF_LOOPS};i+=1)); do runInspectITPrometheus cleanup - printIntermediaryResults + printIntermediaryResults "${i}" done # Create R labels diff --git a/upload.sh b/upload.sh index 07a954188353da4c4b8028574e33e9c81ac77681..1cad28e1800de6c88b7e2713e4d06f701c4b9f27 100755 --- a/upload.sh +++ b/upload.sh @@ -11,6 +11,9 @@ BASE_DIR=$(cd "$(dirname "$0")"; pwd) KEYSTORE="$1" UPDATE_SITE_URL="$2" +error "Upload deactived for debugging purposes." +exit 1 + # # source functionality #