From f0c2f8db99757ef372d8d7cc66d47cd6287d98ea Mon Sep 17 00:00:00 2001
From: David Georg Reichelt <davidgeorg_reichelt@dagere.de>
Date: Sun, 18 Jul 2021 17:41:37 +0200
Subject: [PATCH] Fix package names and pathes, so Kieker instrumentation works

---
 frameworks/Kieker/scripts/benchmark.sh        | 6 ++++--
 frameworks/Kieker/scripts/config              | 2 +-
 frameworks/Kieker/src/META-INF/kieker.aop.xml | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/frameworks/Kieker/scripts/benchmark.sh b/frameworks/Kieker/scripts/benchmark.sh
index a29f705..170b50a 100755
--- a/frameworks/Kieker/scripts/benchmark.sh
+++ b/frameworks/Kieker/scripts/benchmark.sh
@@ -68,7 +68,7 @@ JAVA_ARGS="${JAVA_ARGS} -Xms1G -Xmx2G"
 
 JAVA_OPTS="${FIXED_PARAMETERS}"
 
-LTW_ARGS="-javaagent:${AGENT} -Dorg.aspectj.weaver.showWeaveInfo=false -Daj.weaving.verbose=false -Dkieker.monitoring.skipDefaultAOPConfiguration=true -Dorg.aspectj.weaver.loadtime.configuration=${AOP}"
+LTW_ARGS="-javaagent:${AGENT} -Dorg.aspectj.weaver.showWeaveInfo=true -Daj.weaving.verbose=true -Dkieker.monitoring.skipDefaultAOPConfiguration=true -Dorg.aspectj.weaver.loadtime.configuration=${AOP}"
 
 KIEKER_ARGS="-Dlog4j.configuration=log4j.cfg -Dkieker.monitoring.name=KIEKER-BENCHMARK -Dkieker.monitoring.adaptiveMonitoring.enabled=false -Dkieker.monitoring.periodicSensorsExecutorPoolSize=0"
 
@@ -151,6 +151,8 @@ function execute-experiment() {
     else
        BENCHMARK_OPTS="${JAVA_ARGS} ${LTW_ARGS} ${KIEKER_ARGS} ${kieker_parameters}"
     fi
+    
+    echo ${BENCHMARK}" "${BENCHMARK_OPTS}" moobench.benchmark.BenchmarkMain"
 
     ${BENCHMARK} ${BENCHMARK_OPTS} moobench.benchmark.BenchmarkMain \
     	--application moobench.application.MonitoredClassSimple \
@@ -194,7 +196,7 @@ function getSum {
 
 function printIntermediaryResults {
    for ((index=0;index<${#WRITER_CONFIG[@]};index+=1)); do
-      echo -n "Intermediary results $TITLE[$index] "
+      echo -n "Intermediary results "$TITLE[$index]" "
       cat results-kieker/raw-*-${RECURSION_DEPTH}-${index}.csv | awk -F';' '{print $2}' | getSum
    done
 }
diff --git a/frameworks/Kieker/scripts/config b/frameworks/Kieker/scripts/config
index ecc1381..eacf4b0 100644
--- a/frameworks/Kieker/scripts/config
+++ b/frameworks/Kieker/scripts/config
@@ -14,7 +14,7 @@ BENCHMARK="${BASE_DIR}/benchmark/bin/benchmark"
 BATCH_MODE="yes"
 
 # in-jar locations
-AOP="kieker.aop.xml"
+AOP="file:"$(pwd)"/../src/META-INF/kieker.aop.xml"
 
 # execution parameter
 SLEEP_TIME=30                   ## 30
diff --git a/frameworks/Kieker/src/META-INF/kieker.aop.xml b/frameworks/Kieker/src/META-INF/kieker.aop.xml
index 579e660..8ebe6f3 100644
--- a/frameworks/Kieker/src/META-INF/kieker.aop.xml
+++ b/frameworks/Kieker/src/META-INF/kieker.aop.xml
@@ -1,7 +1,7 @@
 <!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.aspectj.org/dtd/aspectj_1_5_0.dtd">
 <aspectj>
     <weaver options="">
-        <include within="mooBench.monitoredApplication.*"/>
+        <include within="moobench.application.*"/>
     </weaver>
     <aspects>
         <aspect name="kieker.monitoring.probe.aspectj.flow.operationExecution.FullInstrumentation" />
-- 
GitLab