diff --git a/frameworks/Kieker/java/benchmark.sh b/frameworks/Kieker/java/benchmark.sh index 9d081ee17fb04033bb596a729a447c5d8b72d535..e49f92b38fbf6f30c2c5ec35765caf7276cbf745 100755 --- a/frameworks/Kieker/java/benchmark.sh +++ b/frameworks/Kieker/java/benchmark.sh @@ -3,7 +3,7 @@ # # Kieker benchmark script # -# Usage: benchmark.sh [execute|test] +# Usage: benchmark.sh # configure base dir BASE_DIR=$(cd "$(dirname "$0")"; pwd) @@ -44,6 +44,7 @@ else echo "Missing file: ${BASE_DIR}/labels.sh" exit 1 fi + # # Setup # @@ -58,6 +59,7 @@ cd "${BASE_DIR}" getAgent checkDirectory data-dir "${DATA_DIR}" create +checkFile log "${DATA_DIR}/kieker.log" clean checkDirectory results-directory "${RESULTS_DIR}" recreate PARENT=`dirname "${RESULTS_DIR}"` checkDirectory result-base "${PARENT}" @@ -68,13 +70,14 @@ tar -xpf "${RECEIVER_ARCHIVE}" RECEIVER_BIN="${BASE_DIR}/receiver/bin/receiver" checkExecutable receiver "${RECEIVER_BIN}" + checkFile ApsectJ-Agent "${AGENT}" -checkFile R-script "${RSCRIPT_PATH}" -checkFile log "${DATA_DIR}/kieker.log" clean +checkFile aop-file "${AOP}" + checkExecutable java "${JAVA_BIN}" checkExecutable moobench "${MOOBENCH_BIN}" -checkFile aop-file "${AOP}" +checkFile R-script "${RSCRIPT_PATH}" showParameter @@ -106,28 +109,7 @@ WRITER_CONFIG[4]="-Dkieker.monitoring.enabled=true -Dkieker.monitoring.writer=ki WRITER_CONFIG[5]="-Dkieker.monitoring.writer=kieker.monitoring.writer.tcp.SingleSocketTcpWriter -Dkieker.monitoring.writer.tcp.SingleSocketTcpWriter.port=2345" RECEIVER[5]="${RECEIVER_BIN} 2345" -# -# Write configuration -# - -uname -a > "${RESULTS_DIR}/configuration.txt" -"${JAVA_BIN}" "${JAVA_ARGS}" -version 2>> "${RESULTS_DIR}/configuration.txt" -cat << EOF >> "${RESULTS_DIR}/configuration.txt" -JAVA_ARGS: ${JAVA_ARGS} - -Runtime: circa ${TIME} seconds - -SLEEP_TIME=${SLEEP_TIME} -NUM_OF_LOOPS=${NUM_OF_LOOPS} -TOTAL_NUM_OF_CALLS=${TOTAL_NUM_OF_CALLS} -METHOD_TIME=${METHOD_TIME} -RECURSION_DEPTH=${RECURSION_DEPTH} -EOF - -info "Ok" - -sync - +writeConfiguration # # Run benchmark @@ -137,13 +119,30 @@ info "----------------------------------" info "Running benchmark..." info "----------------------------------" -executeBenchmark +for ((i=1;loop<="${NUM_OF_LOOPS}";i+=1)); do + + info "## Starting iteration ${i}/${NUM_OF_LOOPS}" + echo "## Starting iteration ${i}/${NUM_OF_LOOPS}" >> "${DATA_DIR}/kieker.log" + + executeBenchmark + + printIntermediaryResults +done # Create R labels LABELS=$(createRLabels) runStatistics + cleanupResults +mv "${DATA_DIR}/kieker.log" "${RESULTS_DIR}/kieker.log" +[ -f "${RESULTS_DIR}/hotspot-1-${RECURSION_DEPTH}-1.log" ] && grep "<task " "${RESULTS_DIR}/"hotspot-*.log > "${RESULTS_DIR}/java.log" +[ -f "${DATA_DIR}/errorlog.txt" ] && mv "${DATA_DIR}/errorlog.txt" "${RESULTS_DIR}" + +checkFile results.yaml "${RESULTS_DIR}/results.yaml" +checkFile results.yaml "${RESULTS_DIR}/results.zip" + info "Done." +exit 0 # end diff --git a/frameworks/Kieker/java/functions.sh b/frameworks/Kieker/java/functions.sh index a02f0d687a9ec2ce1dd938175525585a72022e02..2492207b3a7a15cae55645980875ed0cfb072664 100644 --- a/frameworks/Kieker/java/functions.sh +++ b/frameworks/Kieker/java/functions.sh @@ -88,22 +88,11 @@ function executeBenchmarkBody() { ## Execute Benchmark function executeBenchmark() { - for ((loop=1;loop<="${NUM_OF_LOOPS}";loop+=1)); do recursion="${RECURSION_DEPTH}" - info "## Starting iteration ${loop}/${NUM_OF_LOOPS}" - echo "## Starting iteration ${loop}/${NUM_OF_LOOPS}" >> "${DATA_DIR}/kieker.log" - for ((index=0;index<${#WRITER_CONFIG[@]};index+=1)); do - executeBenchmarkBody $index $loop $recursion + executeBenchmarkBody $index $i $recursion done - - printIntermediaryResults - done - - mv "${DATA_DIR}/kieker.log" "${RESULTS_DIR}/kieker.log" - [ -f "${RESULTS_DIR}/hotspot-1-${RECURSION_DEPTH}-1.log" ] && grep "<task " "${RESULTS_DIR}"/hotspot-*.log > "${RESULTS_DIR}/log.log" - [ -f "${DATA_DIR}/errorlog.txt" ] && mv "${DATA_DIR}/errorlog.txt" "${RESULTS_DIR}" } diff --git a/frameworks/Kieker/python/benchmark.sh b/frameworks/Kieker/python/benchmark.sh index 75c083cf77f7414741a17d719ae78e898c49a9b0..49e5fa1e466b9975a4389758332fffe0780b2120 100755 --- a/frameworks/Kieker/python/benchmark.sh +++ b/frameworks/Kieker/python/benchmark.sh @@ -1,9 +1,9 @@ #!/bin/bash # -# Kieker benchmark script +# Kieker python benchmark script # -# Usage: benchmark.sh [execute|test] +# Usage: benchmark.sh # configure base dir BASE_DIR=$(cd "$(dirname "$0")"; pwd) @@ -44,6 +44,7 @@ else echo "Missing file: ${BASE_DIR}/labels.sh" exit 1 fi + # # Setup # @@ -57,10 +58,11 @@ cd "${BASE_DIR}" # load agent getAgent -checkDirectory data-dir "${DATA_DIR}" create +checkFile log "${DATA_DIR}/kieker.log" clean checkDirectory results-directory "${RESULTS_DIR}" recreate PARENT=`dirname "${RESULTS_DIR}"` checkDirectory result-base "${PARENT}" +checkDirectory data-dir "${DATA_DIR}" create # Find receiver and extract it checkFile receiver "${RECEIVER_ARCHIVE}" @@ -69,7 +71,6 @@ RECEIVER_BIN="${BASE_DIR}/receiver/bin/receiver" checkExecutable receiver "${RECEIVER_BIN}" checkFile R-script "${RSCRIPT_PATH}" -checkFile log "${DATA_DIR}/kieker.log" clean showParameter @@ -98,10 +99,9 @@ METHOD_TIME=${METHOD_TIME} RECURSION_DEPTH=${RECURSION_DEPTH} EOF -info "Ok" - sync +info "Ok" # # Run benchmark @@ -111,13 +111,42 @@ info "----------------------------------" info "Running benchmark..." info "----------------------------------" -executeBenchmark + +## Execute Benchmark +for ((i=1;loop<="${NUM_OF_LOOPS}";i+=1)); do + + info "## Starting iteration ${i}/${NUM_OF_LOOPS}" + echo "## Starting iteration ${i}/${NUM_OF_LOOPS}" >> "${DATA_DIR}/kieker.log" + + noInstrumentation 0 $loop + + dactivatedProbe 1 $loop 1 + dactivatedProbe 2 $loop 2 + + noLogging 3 $loop 1 + noLogging 4 $loop 2 + + textLogging 5 $loop 1 + textLogging 6 $loop 2 + + tcpLogging 7 $loop 1 + tcpLogging 8 $loop 2 + + printIntermediaryResults +done # Create R labels LABELS=$(createRLabels) runStatistics cleanupResults +mv "${DATA_DIR}/kieker.log" "${RESULTS_DIR}/kieker.log" +[ -f "${DATA_DIR}/errorlog.txt" ] && mv "${DATA_DIR}/errorlog.txt" "${RESULTS_DIR}" + +checkFile results.yaml "${RESULTS_DIR}/results.yaml" +checkFile results.yaml "${RESULTS_DIR}/results.zip" + info "Done." +exit 0 # end diff --git a/frameworks/Kieker/python/functions.sh b/frameworks/Kieker/python/functions.sh index 5f1ba27ad0fd9822ef6be74055e272835951d628..c5f5be86eb86311233f80ae7be84f24ba8062aaf 100644 --- a/frameworks/Kieker/python/functions.sh +++ b/frameworks/Kieker/python/functions.sh @@ -40,6 +40,7 @@ function createConfig() { inactive="$1" instrument="$2" approach="$3" + loop="$4" cat > "${BASE_DIR}/config.ini" << EOF [Benchmark] total_calls = ${TOTAL_NUM_OF_CALLS} @@ -77,7 +78,7 @@ function noInstrumentation() { echo " # ${loop}.${RECURSION_DEPTH}.${index} ${TITLE[index]}" >> "${DATA_DIR}/kieker.log" createMonitoring dummy - createConfig True False 1 + createConfig True False 1 $loop "${PYTHON}" benchmark.py "${BASE_DIR}/config.ini" # &> "${RESULTS_DIR}/output_${loop}_${RECURSION_DEPTH}_${index}.txt" @@ -96,7 +97,7 @@ function dactivatedProbe() { echo " # ${loop}.${RECURSION_DEPTH}.${index} ${TITLE[index]}" >> "${DATA_DIR}/kieker.log" createMonitoring dummy - createConfig True True ${approach} + createConfig True True ${approach} $loop "${PYTHON}" benchmark.py "${BASE_DIR}/config.ini" # &> "${RESULTS_DIR}/output_${loop}_${RECURSION_DEPTH}_${index}.txt" @@ -116,7 +117,7 @@ function noLogging() { echo " # ${loop}.${RECURSION_DEPTH}.${index} ${TITLE[index]}" >> "${DATA_DIR}/kieker.log" createMonitoring dummy - createConfig False True ${approach} + createConfig False True ${approach} $loop "${PYTHON}" benchmark.py "${BASE_DIR}/config.ini" # &> "${RESULTS_DIR}/output_${loop}_${RECURSION_DEPTH}_${index}.txt" @@ -136,7 +137,7 @@ function textLogging() { echo " # ${loop}.${RECURSION_DEPTH}.${index} ${TITLE[index]}" >> "${DATA_DIR}/kieker.log" createMonitoring text - createConfig False True ${approach} + createConfig False True ${approach} $loop "${PYTHON}" benchmark.py "${BASE_DIR}/config.ini" # &> "${RESULTS_DIR}/output_${loop}_${RECURSION_DEPTH}_${index}.txt" @@ -161,7 +162,7 @@ function tcpLogging() { sleep "${SLEEP_TIME}" createMonitoring tcp - createConfig False True ${approach} + createConfig False True ${approach} $loop "${PYTHON}" benchmark.py "${BASE_DIR}/config.ini" # &> "${RESULTS_DIR}/output_${loop}_${RECURSION_DEPTH}_${index}.txt" @@ -173,27 +174,4 @@ function tcpLogging() { sleep "${SLEEP_TIME}" } -## Execute Benchmark -function executeBenchmark() { - for ((loop=1;loop<="${NUM_OF_LOOPS}";loop+=1)); do - info "## Starting iteration ${loop}/${NUM_OF_LOOPS}" - echo "## Starting iteration ${loop}/${NUM_OF_LOOPS}" >> "${DATA_DIR}/kieker.log" - - noInstrumentation 0 $loop - dactivatedProbe 1 $loop 1 - dactivatedProbe 2 $loop 2 - noLogging 3 $loop 1 - noLogging 4 $loop 2 - textLogging 5 $loop 1 - textLogging 6 $loop 2 - tcpLogging 7 $loop 1 - tcpLogging 8 $loop 2 - - printIntermediaryResults - done - - mv "${DATA_DIR}/kieker.log" "${RESULTS_DIR}/kieker.log" - [ -f "${DATA_DIR}/errorlog.txt" ] && mv "${DATA_DIR}/errorlog.txt" "${RESULTS_DIR}" -} - # end diff --git a/frameworks/OpenTelemetry/benchmark.sh b/frameworks/OpenTelemetry/benchmark.sh index 96f4de191ace5bbf204146190e81836f455483f8..7a836c40b43bea0ffbf63ebccd5c9aecf1559303 100755 --- a/frameworks/OpenTelemetry/benchmark.sh +++ b/frameworks/OpenTelemetry/benchmark.sh @@ -56,18 +56,21 @@ info "----------------------------------" # load agent getAgent -checkExecutable MooBench "${MOOBENCH_BIN}" checkFile log "${BASE_DIR}/OpenTelemetry.log" clean checkDirectory results-directory "${RESULTS_DIR}" recreate + +checkFile opentelemetry-agent "${AGENT_JAR}" + checkExecutable java "${JAVA_BIN}" +checkExecutable moobench "${MOOBENCH_BIN}" checkFile R-script "${RSCRIPT_PATH}" -checkFile opentelemetry-agent "${AGENT_JAR}" showParameter TIME=`expr ${METHOD_TIME} \* ${TOTAL_NUM_OF_CALLS} / 1000000000 \* 4 \* ${RECURSION_DEPTH} \* ${NUM_OF_LOOPS} + ${SLEEP_TIME} \* 4 \* ${NUM_OF_LOOPS} \* ${RECURSION_DEPTH} + 50 \* ${TOTAL_NUM_OF_CALLS} / 1000000000 \* 4 \* ${RECURSION_DEPTH} \* ${NUM_OF_LOOPS} ` info "Experiment will take circa ${TIME} seconds." +# general server arguments JAVA_ARGS="-Xms1G -Xmx2G -verbose:gc" JAVA_ARGS_NOINSTR="${JAVA_ARGS}" @@ -119,8 +122,13 @@ runStatistics cleanupResults mv "${BASE_DIR}/OpenTelemetry.log" "${RESULTS_DIR}/OpenTelemetry.log" -[ -f "${RESULTS_DIR}/hotspot-1-${RECURSION_DEPTH}-1.log" ] && grep "<task " "${RESULTS_DIR}/"hotspot-*.log > "${RESULTS_DIR}/OpenTelemetry.log" +[ -f "${RESULTS_DIR}/hotspot-1-${RECURSION_DEPTH}-1.log" ] && grep "<task " "${RESULTS_DIR}/"hotspot-*.log > "${RESULTS_DIR}/java.log" [ -f "${BASE_DIR}/errorlog.txt" ] && mv "${BASE_DIR}/errorlog.txt" "${RESULTS_DIR}" +checkFile results.yaml "${RESULTS_DIR}/results.yaml" +checkFile results.yaml "${RESULTS_DIR}/results.zip" + +info "Done." + exit 0 # end diff --git a/frameworks/common-functions.sh b/frameworks/common-functions.sh index e49f8a2eb225250122099c555bd954b466435c6a..d0e528bbd51b52abb7d42aa635ececbbf68f3a61 100755 --- a/frameworks/common-functions.sh +++ b/frameworks/common-functions.sh @@ -96,17 +96,19 @@ 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" + cat << EOF >> "${RESULTS_DIR}/configuration.txt" +JAVA_ARGS: ${JAVA_ARGS} + +Runtime: circa ${TIME} seconds + +SLEEP_TIME=${SLEEP_TIME} +NUM_OF_LOOPS=${NUM_OF_LOOPS} +TOTAL_NUM_OF_CALLS=${TOTAL_NUM_OF_CALLS} +METHOD_TIME=${METHOD_TIME} +THREADS=${THREADS} +RECURSION_DEPTH=${RECURSION_DEPTH} +EOF sync } diff --git a/frameworks/inspectIT/benchmark.sh b/frameworks/inspectIT/benchmark.sh index 3bc29f603574ac2359a9b81e95d19d395519e8e7..f92f56063d1c25e4f7346d6c8ec68cf3fbac9647 100755 --- a/frameworks/inspectIT/benchmark.sh +++ b/frameworks/inspectIT/benchmark.sh @@ -56,10 +56,11 @@ info "----------------------------------" # load agent getAgent -checkExecutable MooBench "${MOOBENCH_BIN}" checkFile log "${BASE_DIR}/inspectIT.log" clean checkDirectory results-directory "${RESULTS_DIR}" recreate + checkExecutable java "${JAVA_BIN}" +checkExecutable moobench "${MOOBENCH_BIN}" checkFile R-script "${RSCRIPT_PATH}" showParameter @@ -67,6 +68,7 @@ showParameter TIME=`expr ${METHOD_TIME} \* ${TOTAL_NUM_OF_CALLS} / 1000000000 \* 4 \* ${RECURSION_DEPTH} \* ${NUM_OF_LOOPS} + ${SLEEP_TIME} \* 4 \* ${NUM_OF_LOOPS} \* ${RECURSION_DEPTH} + 50 \* ${TOTAL_NUM_OF_CALLS} / 1000000000 \* 4 \* ${RECURSION_DEPTH} \* ${NUM_OF_LOOPS} ` info "Experiment will take circa ${TIME} seconds." +# general server arguments JAVA_ARGS="-Xms1G -Xmx2G -verbose:gc" JAVA_ARGS_NOINSTR="${JAVA_ARGS}" @@ -97,7 +99,7 @@ for ((i=1;i<=${NUM_OF_LOOPS};i+=1)); do runInspectITDeactivated cleanup - + runInspectITNullWriter cleanup @@ -110,18 +112,21 @@ for ((i=1;i<=${NUM_OF_LOOPS};i+=1)); do printIntermediaryResults done -mv "${BASE_DIR}/inspectIT.log" "${RESULTS_DIR}/inspectIT.log" -[ -f "${RESULTS_DIR}/Hotspot-1-${RECURSION_DEPTH}-1.log" ] && grep "<task " ${RESULTS_DIR}/hotspot-*.log > "${RESULTS_DIR}/log.log" -[ -f "${BASE_DIR}/errorlog.txt" ] && mv "${BASE_DIR}/errorlog.txt" "${RESULTS_DIR}" - # Create R labels LABELS=$(createRLabels) runStatistics -## Clean up raw results -zip -jqr "${RESULTS_DIR}/results.zip" ${RAWFN}* -rm ${RAWFN}* +cleanupResults +{RAWFN}* + +mv "${BASE_DIR}/inspectIT.log" "${RESULTS_DIR}/inspectIT.log" +[ -f "${RESULTS_DIR}/hotspot-1-${RECURSION_DEPTH}-1.log" ] && grep "<task " "${RESULTS_DIR}/"hotspot-*.log > "${RESULTS_DIR}/java.log" +[ -f "${BASE_DIR}/errorlog.txt" ] && mv "${BASE_DIR}/errorlog.txt" "${RESULTS_DIR}" + +checkFile results.yaml "${RESULTS_DIR}/results.yaml" +checkFile results.yaml "${RESULTS_DIR}/results.zip" info "Done." +exit 0 # end