Skip to content
Snippets Groups Projects
Commit 521c3e7d authored by Reiner Jung's avatar Reiner Jung
Browse files

Fixed benchmark.

parent 7892c25a
No related branches found
No related tags found
No related merge requests found
# Ignore Gradle project-specific cache directory # Ignore Gradle project-specific cache directory
**/.gradle/** **/.gradle/**
/receiver
/benchmark
.classpath .classpath
.settings .settings
**/.classpath **/.classpath
......
...@@ -7,6 +7,10 @@ dependencies { ...@@ -7,6 +7,10 @@ dependencies {
implementation 'com.beust:jcommander:1.72' implementation 'com.beust:jcommander:1.72'
} }
application {
mainClass = 'moobench.benchmark.BenchmarkMain'
}
jar { jar {
manifest { manifest {
attributes 'Implementation-Title': 'Moobench Benchmark', attributes 'Implementation-Title': 'Moobench Benchmark',
...@@ -19,27 +23,4 @@ jar { ...@@ -19,27 +23,4 @@ jar {
from { from {
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) } configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
} }
doLast {
copy {
from jar
into "../frameworks/SPASSmeter/"
rename('benchmark.jar', 'MooBench.jar')
}
copy {
from jar
into "../frameworks/OpenTelemetry/"
rename('benchmark.jar', 'MooBench.jar')
}
copy {
from jar
into "../frameworks/inspectIT/"
rename('benchmark.jar', 'MooBench.jar')
}
copy {
from jar
into "../frameworks/Kieker/"
rename('benchmark.jar', 'MooBench.jar')
}
}
} }
...@@ -91,8 +91,9 @@ checkFile Labels "${BASE_DIR}/labels.sh" ...@@ -91,8 +91,9 @@ checkFile Labels "${BASE_DIR}/labels.sh"
checkFile R-script "${RSCRIPT_PATH}" checkFile R-script "${RSCRIPT_PATH}"
checkDirectory results-directory "${RESULTS_DIR}" recreate checkDirectory results-directory "${RESULTS_DIR}" recreate
checkFile log "${DATA_DIR}/kieker.log" clean checkFile log "${DATA_DIR}/kieker.log" clean
checkFile MooBench "${BASE_DIR}/MooBench.jar"
checkExecutable java "${JAVA_BIN}" checkExecutable java "${JAVA_BIN}"
checkExecutable moobench "${MOOBENCH_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} ` 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." info "Experiment will take circa ${TIME} seconds."
...@@ -101,7 +102,7 @@ info "Experiment will take circa ${TIME} seconds." ...@@ -101,7 +102,7 @@ info "Experiment will take circa ${TIME} seconds."
JAVA_ARGS="-server" JAVA_ARGS="-server"
JAVA_ARGS="${JAVA_ARGS} -Xms1G -Xmx2G" JAVA_ARGS="${JAVA_ARGS} -Xms1G -Xmx2G"
LTW_ARGS="-javaagent:${AGENT} -Dorg.aspectj.weaver.showWeaveInfo=true -Daj.weaving.verbose=true -Dkieker.monitoring.skipDefaultAOPConfiguration=true -Dorg.aspectj.weaver.loadtime.configuration=${AOP}" 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}"
KIEKER_ARGS="-Dlog4j.configuration=log4j.cfg -Dkieker.monitoring.name=KIEKER-BENCHMARK -Dkieker.monitoring.adaptiveMonitoring.enabled=false -Dkieker.monitoring.periodicSensorsExecutorPoolSize=0" KIEKER_ARGS="-Dlog4j.configuration=log4j.cfg -Dkieker.monitoring.name=KIEKER-BENCHMARK -Dkieker.monitoring.adaptiveMonitoring.enabled=false -Dkieker.monitoring.periodicSensorsExecutorPoolSize=0"
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
JAVA_BIN="/usr/bin/java" JAVA_BIN="/usr/bin/java"
RSCRIPT_PATH="${BASE_DIR}/stats.csv.r" RSCRIPT_PATH="${BASE_DIR}/stats.csv.r"
MOOBENCH_BIN="${BASE_DIR}/../../benchmark/bin/benchmark"
DATA_DIR="${BASE_DIR}/data" DATA_DIR="${BASE_DIR}/data"
AGENT="${BASE_DIR}/kieker-2.0.0-SNAPSHOT-aspectj.jar" AGENT="${BASE_DIR}/kieker-2.0.0-SNAPSHOT-aspectj.jar"
# in-jar locations # in-jar locations
AOP="file:"$(pwd)"/src/META-INF/kieker.aop.xml" AOP="${BASE_DIR}/kieker.aop.xml"
# end # end
...@@ -40,21 +40,21 @@ function executeExperiment() { ...@@ -40,21 +40,21 @@ function executeExperiment() {
info " # recursion=${recursion} loop=${loop} writer=${index} ${title}" info " # recursion=${recursion} loop=${loop} writer=${index} ${title}"
echo " # ${loop}.${recursion}.${index} ${title}" >> "${DATA_DIR}/kieker.log" echo " # ${loop}.${recursion}.${index} ${title}" >> "${DATA_DIR}/kieker.log"
if [ "${kieker_parameters}" = "" ] ; then if [ "${kieker_parameters}" == "" ] ; then
BENCHMARK_OPTS="${JAVA_ARGS}" export BENCHMARK_OPTS="${JAVA_ARGS}"
else else
BENCHMARK_OPTS="${JAVA_ARGS} ${LTW_ARGS} ${KIEKER_ARGS} ${kieker_parameters}" export BENCHMARK_OPTS="${JAVA_ARGS} ${LTW_ARGS} ${KIEKER_ARGS} ${kieker_parameters}"
fi fi
debug "Run options: ${BENCHMARK_OPTS} -jar MooBench.jar" debug "Run options: ${BENCHMARK_OPTS}"
"${JAVA_BIN}" ${BENCHMARK_OPTS} -jar "${BASE_DIR}/MooBench.jar" \ "${MOOBENCH_BIN}" \
--application moobench.application.MonitoredClassSimple \ --application moobench.application.MonitoredClassSimple \
--output-filename "${RAWFN}-${loop}-${recursion}-${index}.csv" \ --output-filename "${RAWFN}-${loop}-${recursion}-${index}.csv" \
--total-calls "${TOTAL_NUM_OF_CALLS}" \ --total-calls "${TOTAL_NUM_OF_CALLS}" \
--method-time "${METHOD_TIME}" \ --method-time "${METHOD_TIME}" \
--total-threads 1 \ --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-* rm -rf "${DATA_DIR}"/kieker-*
...@@ -71,7 +71,7 @@ function executeBenchmarkBody() { ...@@ -71,7 +71,7 @@ function executeBenchmarkBody() {
recursion="$3" recursion="$3"
if [[ "${RECEIVER[$index]}" ]] ; then if [[ "${RECEIVER[$index]}" ]] ; then
echo "receiver ${RECEIVER[$index]}" echo "receiver ${RECEIVER[$index]}"
${RECEIVER[$index]} >> "${DATA_DIR}/kieker.receiver-${i}-${index}.log" & ${RECEIVER[$index]} >> "${DATA_DIR}/kieker.receiver-${loop}-${index}.log" &
RECEIVER_PID=$! RECEIVER_PID=$!
echo "PID $RECEIVER_PID" echo "PID $RECEIVER_PID"
fi fi
......
...@@ -125,10 +125,12 @@ if [ "$BATCH_MODE" == "yes" ] ; then ...@@ -125,10 +125,12 @@ if [ "$BATCH_MODE" == "yes" ] ; then
export ERROR="[error]" export ERROR="[error]"
export WARNING="[warning]" export WARNING="[warning]"
export INFO="[info]" export INFO="[info]"
export DEBUG_INFO="[debug]"
else else
export ERROR="${RED}[error]${NC}" export ERROR="${RED}[error]${NC}"
export WARNING="${YELLOW}[warning]${NC}" export WARNING="${YELLOW}[warning]${NC}"
export INFO="${WHITE}[info]${NC}" export INFO="${WHITE}[info]${NC}"
export DEBUG_INFO="${WHITE}[debug]${NC}"
fi fi
function error() { function error() {
...@@ -144,8 +146,8 @@ function info() { ...@@ -144,8 +146,8 @@ function info() {
} }
function debug() { function debug() {
if [ "$DEBUG" == "yes" ] ; then if [ "${DEBUG}" == "yes" ] ; then
echo -e "${INFO} $@" echo -e "${DEBUG_INFO} $@"
fi fi
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment