Skip to content

Instantly share code, notes, and snippets.

@DaGeRe
Last active August 2, 2023 13:48
Show Gist options
  • Select an option

  • Save DaGeRe/c7159297bad4bd13fb556dcf696d0699 to your computer and use it in GitHub Desktop.

Select an option

Save DaGeRe/c7159297bad4bd13fb556dcf696d0699 to your computer and use it in GitHub Desktop.

Experiment 1: Examination of different $RECURSION_DEPTH and $TOTAL_NUM_OF_CALLS

The following steps are necessary for measurement:

git clone https://github.com/kieker-monitoring/moobench.git
cd moobench
git checkout binaryNoLoggingExamination-experiment-1
./setup.sh
cd frameworks/Kieker-java

export NUM_OF_LOOPS=10; export SLEEP_TIME=1;
for depth in 2 10 20 50 75 100 200 300 400 500 600 750 1000; do export RECURSION_DEPTH=$depth; ./benchmark.sh &> depth_$depth.txt; done
for calls in 100 1000 100000 1000000 2000000 10000000 100000000 1000000000; do export TOTAL_NUM_OF_CALLS=$calls; ./benchmark.sh &> calls_$calls.txt; done
for threads in {1..10}; do export THREADS=$threads; ./benchmark.sh &> threads_$threads.txt; done

Experiment 2: Analysis With perf

For this step, it is assumed that perf has been installed (requires also installation of perf and linux-tools-common using apt, or the respective packages in other distributions). It is also assumed that the repository is already cloned and built (./setup.sh has been executed`).

This requires Java 17 (since the use of -XX:+DumpPerfMapAtExit; otherwise, external tools would be needed to get the method execution data).

Then, the following steps are necessary for measurement:

git checkout binaryNoLoggingExamination-experiment-2
cd frameworks/Kieker-java

export NUM_OF_LOOPS=1; ./benchmark.sh

Afterwards, the analysis requires the flame graph repo (git clone git@github.com:brendangregg/FlameGraph.git) to be cloned and $FLAME_HOME pointing to it. Afterwards, the analysis can be executed using ./createGraphs.sh and graphs/ will contain the graphs (flame graph of binary writing and no logging execution and diff seen from the binary writing and no logging).

Experiment 3: Artificial Overhead in DumpWriter

To examine the overhead in DumpWriter, first, Kieker needs to be built with the DumpWriter configured for the experiment:

git clone https://github.com/kieker-monitoring/kieker.git
cd kieker
git checkout KIEKER-1958-examinationLogging
./gradlew clean aspectJJar -x test -x check && cp build/libs/kieker-2.0.0-SNAPSHOT-aspectj.jar ../moobench/frameworks/Kieker-java/

Afterwards, execute the experiments in the MooBench folder:

for loops in {1..20}; do export DUMMY_LOOPS=$loops; ./benchmark.sh &> dummy_$loops.txt; done

Finally, the results can be analyzed:

for loops in {1..20}; do echo -n "$loops "; cat dummy_$loops.txt | grep "Intermediary results No logging\|Intermediary results Binary file" dummy_$loops.txt | tail -n 2 | awk '{ if (NR%2 != 0) line=$9; else {printf("%s %s\n", line, $9); line="";} }'; done

All together

To ease the execution, you could also execute all the experiments at once:

./runAll.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment