diff --git a/frameworks/Kieker/java/benchmark.sh b/frameworks/Kieker/java/benchmark.sh index b7050760dd2c0f5e5031e9dbcfe85ea4859f8293..185ec267cc95e7da0699c3d6b51af3d49c8f37c5 100755 --- a/frameworks/Kieker/java/benchmark.sh +++ b/frameworks/Kieker/java/benchmark.sh @@ -71,17 +71,16 @@ info "----------------------------------" getAgent # Find receiver and extract it -RECEIVER_ARCHIVE="${BASE_DIR}/../../tools/receiver/build/distributions/receiver.tar" -if [ -f "${RECEIVER_ARCHIVE}" ] ; then - tar -xpf "${RECEIVER_ARCHIVE}" -else - echo "Error receiver not found at ${RECEIVER_ARCHIVE}" - exit 1 -fi +checkFile receiver "${RECEIVER_ARCHIVE}" +tar -xpf "${RECEIVER_ARCHIVE}" +RECEIVER_BIN="${BASE_DIR}/receiver/bin/receiver" + +checkFile moobench "${MOOBENCH_ARCHIVE}" +tar -xpf "${MOOBENCH_ARCHIVE}" +MOOBENCH_BIN="${BASE_DIR}/benchmark/bin/benchmark" PARENT=`dirname "${RESULTS_DIR}"` -RECEIVER_BIN="${BASE_DIR}/receiver/bin/receiver" checkDirectory DATA_DIR "${DATA_DIR}" create checkDirectory result-base "${PARENT}" @@ -93,14 +92,14 @@ checkDirectory results-directory "${RESULTS_DIR}" recreate checkFile log "${DATA_DIR}/kieker.log" clean checkExecutable java "${JAVA_BIN}" checkExecutable moobench "${MOOBENCH_BIN}" +checkExecutable receiver "${RECEIVER_BIN}" checkFile aop-file "${AOP}" 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="-server" -JAVA_ARGS="${JAVA_ARGS} -Xms1G -Xmx2G" +JAVA_ARGS="-Xms1G -Xmx2G" LTW_ARGS="-javaagent:${AGENT} --illegal-access=permit -Dorg.aspectj.weaver.showWeaveInfo=true -Daj.weaving.verbose=true -Dkieker.monitoring.skipDefaultAOPConfiguration=true -Dorg.aspectj.weaver.loadtime.configuration=file://${AOP}" @@ -121,7 +120,10 @@ 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 +# +# Write configuration +# + uname -a > "${RESULTS_DIR}/configuration.txt" "${JAVA_BIN}" "${JAVA_ARGS}" -version 2>> "${RESULTS_DIR}/configuration.txt" cat << EOF >> "${RESULTS_DIR}/configuration.txt" diff --git a/frameworks/Kieker/java/config.rc b/frameworks/Kieker/java/config.rc index ae71c4b0795964bf777ea6cc0fb256d71205babd..e186b9ecc3d0cc10c395ec4683a8782c1e9dfa62 100644 --- a/frameworks/Kieker/java/config.rc +++ b/frameworks/Kieker/java/config.rc @@ -5,7 +5,11 @@ JAVA_BIN="/usr/bin/java" RSCRIPT_PATH="${BASE_DIR}/stats.csv.r" -MOOBENCH_BIN="${BASE_DIR}/../../benchmark/bin/benchmark" + +MAIN_DIR="${BASE_DIR}/../../.." + +RECEIVER_ARCHIVE="${MAIN_DIR}/tools/receiver/build/distributions/receiver.tar" +BENCHMARK_ARCHIVE="${MAIN_DIR}/tools/benchmark/build/distributions/benchmark.tar" DATA_DIR="${BASE_DIR}/data" AGENT="${BASE_DIR}/kieker-2.0.0-SNAPSHOT-aspectj.jar" diff --git a/tools/pybenchmark/README.md b/tools/pybenchmark/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8632bf1e5300357d9ceb030b3c61d17eff093417 --- /dev/null +++ b/tools/pybenchmark/README.md @@ -0,0 +1,30 @@ +# README + +Usage: +--total-calls -c * Number of total method calls performed. +--method-time -m * Time a method call takes. +--total-threads -t * Number of threads started. +--recursion-depth -d * Depth of recursion performed. +--output-filename -o * Filename of results file. Output is appended if file exists. +--quickstart -q Skips initial garbage collection. +--force-terminate -f Forces a termination at the end of the benchmark. +--runnable -r Class implementing the Runnable interface. run() method is executed before the benchmark starts. +--application -a Class implementing the MonitoredClass interface. +--benchmark-thread -b Class implementing the BenchmarkingThread interface. + + +* = required parameter + +It is sufficient to implement: +moobench \ + --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}" + +In a fest step it is sufficient do only have MonitoredClassSimple as we are +not going to use something else. + +