diff --git a/Jenkinsfile b/Jenkinsfile index a07f91a4ca9babfe145df6e4436bdb5fad938fd3..2c831e17e0852f0e641196f498c424a34d952b12 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,6 +19,7 @@ pipeline { KEYSTORE = credentials('kieker-irl-key') UPDATE_SITE_URL = "sftp://repo@repo.se.internal/moobench" DOCKER_ARGS = '' + BATCH_MODE = "yes" } options { diff --git a/frameworks/Kieker/java/benchmark.sh b/frameworks/Kieker/java/benchmark.sh index aff8abbe4613c2bef5e597d741310651f1d83046..d83631c960212ec6c7fe0625f9e20b5508e52adb 100755 --- a/frameworks/Kieker/java/benchmark.sh +++ b/frameworks/Kieker/java/benchmark.sh @@ -92,6 +92,8 @@ checkExecutable moobench "${MOOBENCH_BIN}" checkExecutable receiver "${RECEIVER_BIN}" checkFile aop-file "${AOP}" +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." diff --git a/frameworks/Kieker/java/functions.sh b/frameworks/Kieker/java/functions.sh index 39c56b7d60a1677d92ec33e45a6a78ca8e3b2dc9..a02f0d687a9ec2ce1dd938175525585a72022e02 100644 --- a/frameworks/Kieker/java/functions.sh +++ b/frameworks/Kieker/java/functions.sh @@ -72,10 +72,10 @@ function executeBenchmarkBody() { loop="$2" recursion="$3" if [[ "${RECEIVER[$index]}" ]] ; then - echo "receiver ${RECEIVER[$index]}" + debug "receiver ${RECEIVER[$index]}" ${RECEIVER[$index]} >> "${DATA_DIR}/kieker.receiver-${loop}-${index}.log" & RECEIVER_PID=$! - echo "PID $RECEIVER_PID" + debug "PID ${RECEIVER_PID}" fi executeExperiment "$loop" "$recursion" "$index" "${TITLE[$index]}" "${WRITER_CONFIG[$index]}" diff --git a/frameworks/OpenTelemetry/benchmark.sh b/frameworks/OpenTelemetry/benchmark.sh index 9539f8778ceed35582fa8e07822f5edd1c2d6328..96f4de191ace5bbf204146190e81836f455483f8 100755 --- a/frameworks/OpenTelemetry/benchmark.sh +++ b/frameworks/OpenTelemetry/benchmark.sh @@ -63,13 +63,12 @@ checkExecutable java "${JAVA_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." -JAVA_ARGS="-server" -JAVA_ARGS="${JAVA_ARGS} -Xms1G -Xmx2G" -JAVA_ARGS="${JAVA_ARGS} -verbose:gc " +JAVA_ARGS="-Xms1G -Xmx2G -verbose:gc" JAVA_ARGS_NOINSTR="${JAVA_ARGS}" JAVA_ARGS_OPENTELEMETRY_BASIC="${JAVA_ARGS} -javaagent:${AGENT_JAR} -Dotel.resource.attributes=service.name=moobench -Dotel.instrumentation.methods.include=moobench.application.MonitoredClassSimple[monitoredMethod];moobench.application.MonitoredClassThreaded[monitoredMethod]" @@ -123,4 +122,5 @@ 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 "${BASE_DIR}/errorlog.txt" ] && mv "${BASE_DIR}/errorlog.txt" "${RESULTS_DIR}" +exit 0 # end diff --git a/frameworks/OpenTelemetry/functions.sh b/frameworks/OpenTelemetry/functions.sh index 0cebbf59c3b12b1eb3d5ccc19d749163b7cc320b..10e7caee4f13377794925ccde41cda4b3d33a604 100644 --- a/frameworks/OpenTelemetry/functions.sh +++ b/frameworks/OpenTelemetry/functions.sh @@ -24,7 +24,7 @@ function startJaeger { tar -xvf jaeger-1.24.0-linux-amd64.tar.gz rm jaeger-1.24.0-linux-amd64.tar.gz fi - + cd "${BASE_DIR}/jaeger-1.24.0-linux-amd64" "${BASE_DIR}/jaeger-1.24.0-linux-amd64/jaeger-all-in-one" &> "${BASE_DIR}/jaeger-1.24.0-linux-amd64/jaeger.log" & cd "${BASE_DIR}" @@ -81,8 +81,9 @@ function runOpenTelemetryLogging { ${MORE_PARAMS} &> "${RESULTS_DIR}/output_${i}_${RECURSION_DEPTH}_${k}.txt" if [ ! "$DEBUG" = true ] then - echo "DEBUG is $DEBUG, deleting opentelemetry logging file" - rm ${RESULTS_DIR}/output_"$i"_"$RECURSION_DEPTH"_$k.txt + rm "${RESULTS_DIR}/output_${i}_${RECURSION_DEPTH}_${k}.txt" + else + debug "Keeping opentelemetry logging file" fi } diff --git a/frameworks/common-functions.sh b/frameworks/common-functions.sh index a021fe8c1e7f5bd90127e347ab71a399b06d9293..e49f8a2eb225250122099c555bd954b466435c6a 100755 --- a/frameworks/common-functions.sh +++ b/frameworks/common-functions.sh @@ -43,6 +43,11 @@ function createRLabels() { ## Generate Results file function runStatistics() { +if [ "${TOTAL_NUM_OF_CALLS}" == 1 ] ; then + export SKIP=0 +else + export SKIP=${TOTAL_NUM_OF_CALLS}/2 +fi R --vanilla --silent << EOF results_fn="${RAWFN}" out_yaml_fn="${RESULTS_DIR}/results.yaml" @@ -51,7 +56,7 @@ configs.recursion=${RECURSION_DEPTH} configs.labels=c($LABELS) configs.framework_name="${FRAMEWORK_NAME}" results.count=${TOTAL_NUM_OF_CALLS} -results.skip=${TOTAL_NUM_OF_CALLS}/2 +results.skip=${SKIP} source("${RSCRIPT_PATH}") EOF } @@ -107,7 +112,7 @@ function writeConfiguration() { function printIntermediaryResults { for ((index=0;index<${#TITLE[@]};index+=1)); do - echo -n "Intermediary results "${TITLE[$index]}" " + info_n "Intermediary results "${TITLE[$index]}" " cat ${RAWFN}-*-${RECURSION_DEPTH}-${index}.csv | awk -F';' '{print $2}' | getSum done } @@ -145,6 +150,10 @@ function info() { echo -e "${INFO} $@" } +function info_n() { + echo -n -e "${INFO} $@" +} + function debug() { if [ "${DEBUG}" == "yes" ] ; then echo -e "${DEBUG_INFO} $@" @@ -208,6 +217,20 @@ function checkDirectory() { fi } +function showParameter() { + info "FRAMEWORK_NAME ${FRAMEWORK_NAME}" + info "RESULTS_DIR ${RESULTS_DIR}" + info "RAWFN ${RAWFN}" + info "JAVA_BIN ${JAVA_BIN}" + info "SLEEP_TIME ${SLEEP_TIME}" + info "NUM_OF_LOOPS ${NUM_OF_LOOPS}" + info "THREADS ${THREADS}" + info "RECURSION_DEPTH ${RECURSION_DEPTH}" + info "TOTAL_NUM_OF_CALLS ${TOTAL_NUM_OF_CALLS}" + info "METHOD_TIME ${METHOD_TIME}" + info "DEBUG ${DEBUG}" +} + FRAMEWORK_NAME=$(basename -- "${BASE_DIR}") RESULTS_DIR="${BASE_DIR}/results-${FRAMEWORK_NAME}" RAWFN="${RESULTS_DIR}/raw" diff --git a/frameworks/inspectIT/benchmark.sh b/frameworks/inspectIT/benchmark.sh index 385766f3bec95058bbf6ac2cfdc93a8875ab5cbf..3bc29f603574ac2359a9b81e95d19d395519e8e7 100755 --- a/frameworks/inspectIT/benchmark.sh +++ b/frameworks/inspectIT/benchmark.sh @@ -62,13 +62,12 @@ checkDirectory results-directory "${RESULTS_DIR}" recreate checkExecutable java "${JAVA_BIN}" checkFile R-script "${RSCRIPT_PATH}" +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." -JAVA_ARGS="-server" -JAVA_ARGS="${JAVA_ARGS} -Xms1G -Xmx2G" -JAVA_ARGS="${JAVA_ARGS} -verbose:gc " +JAVA_ARGS="-Xms1G -Xmx2G -verbose:gc" JAVA_ARGS_NOINSTR="${JAVA_ARGS}" JAVA_ARGS_LTW="${JAVA_ARGS} -javaagent:${BASE_DIR}/agent/inspectit-ocelot-agent-1.11.1.jar -Djava.util.logging.config.file=${BASE_DIR}/config/logging.properties" @@ -77,8 +76,6 @@ JAVA_ARGS_INSPECTIT_NULLWRITER="${JAVA_ARGS_LTW} -Dinspectit.service-name=mooben JAVA_ARGS_INSPECTIT_ZIPKIN="${JAVA_ARGS_LTW} -Dinspectit.service-name=moobench-inspectit -Dinspectit.exporters.metrics.prometheus.enabled=false -Dinspectit.exporters.tracing.zipkin.url=http://127.0.0.1:9411/api/v2/spans -Dinspectit.config.file-based.path=${BASE_DIR}/config/zipkin/" JAVA_ARGS_INSPECTIT_PROMETHEUS="${JAVA_ARGS_LTW} -Dinspectit.service-name=moobench-inspectit -Dinspectit.exporters.metrics.zipkin.enabled=false -Dinspectit.exporters.metrics.prometheus.enabled=true -Dinspectit.config.file-based.path=${BASE_DIR}/config/prometheus/" -info "RESULTS_DIR: ${RESULTS_DIR}" -info "RAWFN: $RAWFN" writeConfiguration # diff --git a/test.rc b/test.rc new file mode 100644 index 0000000000000000000000000000000000000000..87bfb6de146e85e9f82a48dc9c48525ec4e0c705 --- /dev/null +++ b/test.rc @@ -0,0 +1,8 @@ +export SLEEP_TIME=10 +export NUM_OF_LOOPS=1 +export THREADS=1 +export RECURSION_DEPTH=1 +export TOTAL_NUM_OF_CALLS=1 +export METHOD_TIME=0 +export DEBUG=false +