From 28482edf514e439a1999e0f86b86330ddf2cc590 Mon Sep 17 00:00:00 2001 From: Jan Waller <jwa@informatik.uni-kiel.de> Date: Tue, 4 Mar 2014 14:27:42 +0100 Subject: [PATCH] update Kieker support --- bin/Kieker.sh | 170 ++++++++++++++++ .../Kieker/benchmark-disk-writer-1.9-event.sh | 191 ++++++++++++++++++ .../Kieker/benchmark-disk-writer-1.9-oer.sh | 191 ++++++++++++++++++ frameworks/Kieker/run-benchmark-all.sh | 2 + 4 files changed, 554 insertions(+) create mode 100644 bin/Kieker.sh create mode 100644 frameworks/Kieker/benchmark-disk-writer-1.9-event.sh create mode 100644 frameworks/Kieker/benchmark-disk-writer-1.9-oer.sh diff --git a/bin/Kieker.sh b/bin/Kieker.sh new file mode 100644 index 0000000..1702726 --- /dev/null +++ b/bin/Kieker.sh @@ -0,0 +1,170 @@ +#!/bin/bash + +JAVABIN="" + +RSCRIPTDIR=bin/r/ +BASEDIR=./ +RESULTSDIR="${BASEDIR}tmp/results-kieker/" + +SLEEPTIME=30 ## 30 +NUM_LOOPS=10 ## 10 +THREADS=1 ## 1 +RECURSIONDEPTH=10 ## 10 +TOTALCALLS=2000000 ## 2000000 +METHODTIME=500 ## 500 + +#MOREPARAMS="--quickstart" +MOREPARAMS="${MOREPARAMS} -r kieker.Logger" + +TIME=`expr ${METHODTIME} \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} + ${SLEEPTIME} \* 4 \* ${NUM_LOOPS} \* ${RECURSIONDEPTH} + 50 \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} ` +echo "Experiment will take circa ${TIME} seconds." + +echo "Removing and recreating '$RESULTSDIR'" +(rm -rf ${RESULTSDIR}) && mkdir ${RESULTSDIR} +mkdir ${RESULTSDIR}stat/ + +# Clear kieker.log and initialize logging +rm -f ${BASEDIR}kieker.log +touch ${BASEDIR}kieker.log + +RAWFN="${RESULTSDIR}raw" + +JAVAARGS="-server" +JAVAARGS="${JAVAARGS} -d64" +JAVAARGS="${JAVAARGS} -Xms1G -Xmx4G" +JAVAARGS="${JAVAARGS} -verbose:gc -XX:+PrintCompilation" +#JAVAARGS="${JAVAARGS} -XX:+PrintInlining" +#JAVAARGS="${JAVAARGS} -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation" +#JAVAARGS="${JAVAARGS} -Djava.compiler=NONE" +JAR="-jar dist/OverheadEvaluationMicrobenchmark.jar" + +JAVAARGS_NOINSTR="${JAVAARGS}" +JAVAARGS_LTW="${JAVAARGS} -javaagent:${BASEDIR}lib/kieker-1.9_aspectj.jar -Dorg.aspectj.weaver.showWeaveInfo=false -Daj.weaving.verbose=false -Dorg.aspectj.weaver.loadtime.configuration=META-INF/kieker.aop.xml" +JAVAARGS_KIEKER_DEACTV="${JAVAARGS_LTW} -Dkieker.monitoring.enabled=false -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" +JAVAARGS_KIEKER_NOLOGGING="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" +JAVAARGS_KIEKER_LOGGING="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.filesystem.AsyncFsWriter -Dkieker.monitoring.writer.filesystem.AsyncFsWriter.customStoragePath=${BASEDIR}tmp" + +## Write configuration +uname -a >${RESULTSDIR}configuration.txt +${JAVABIN}java ${JAVAARGS} -version 2>>${RESULTSDIR}configuration.txt +echo "JAVAARGS: ${JAVAARGS}" >>${RESULTSDIR}configuration.txt +echo "" >>${RESULTSDIR}configuration.txt +echo "Runtime: circa ${TIME} seconds" >>${RESULTSDIR}configuration.txt +echo "" >>${RESULTSDIR}configuration.txt +echo "SLEEPTIME=${SLEEPTIME}" >>${RESULTSDIR}configuration.txt +echo "NUM_LOOPS=${NUM_LOOPS}" >>${RESULTSDIR}configuration.txt +echo "TOTALCALLS=${TOTALCALLS}" >>${RESULTSDIR}configuration.txt +echo "METHODTIME=${METHODTIME}" >>${RESULTSDIR}configuration.txt +echo "THREADS=${THREADS}" >>${RESULTSDIR}configuration.txt +echo "RECURSIONDEPTH=${RECURSIONDEPTH}" >>${RESULTSDIR}configuration.txt +sync + +## Execute Benchmark +for ((i=1;i<=${NUM_LOOPS};i+=1)); do + j=${RECURSIONDEPTH} + k=0 + echo "## Starting iteration ${i}/${NUM_LOOPS}" + echo "## Starting iteration ${i}/${NUM_LOOPS}" >>${BASEDIR}kieker.log + + # No instrumentation + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} No instrumentation" + echo " # ${i}.${j}.${k} No instrumentation" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_NOINSTR} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # Deactivated probe + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} Deactivated probe" + echo " # ${i}.${j}.${k} Deactivated probe" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_DEACTV} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # No logging + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} No logging (null writer)" + echo " # ${i}.${j}.${k} No logging (null writer)" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_NOLOGGING} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # Logging + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} Logging" + echo " # ${i}.${j}.${k} Logging" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + rm -rf ${BASEDIR}tmp/kieker-* + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + +done +zip -jqr ${RESULTSDIR}stat.zip ${RESULTSDIR}stat +rm -rf ${RESULTSDIR}stat/ +mv ${BASEDIR}kieker.log ${RESULTSDIR}kieker.log +[ -f ${RESULTSDIR}hotspot-1-${RECURSIONDEPTH}-1.log ] && grep "<task " ${RESULTSDIR}hotspot-*.log >${RESULTSDIR}log.log +[ -f ${BASEDIR}errorlog.txt ] && mv ${BASEDIR}errorlog.txt ${RESULTSDIR} + +## Generate Results file +# Bars +R --vanilla --silent <<EOF +results_fn="${RAWFN}" +outtxt_fn="${RESULTSDIR}results-text.txt" +configs.loop=${NUM_LOOPS} +configs.recursion=c(${RECURSIONDEPTH}) +configs.labels=c("No Probe","Deactivated Probe","Collecting Data","Writer") +results.count=${TOTALCALLS} +results.skip=${TOTALCALLS}/2 +source("${RSCRIPTDIR}stats.r") +EOF + +## Clean up raw results +zip -jqr ${RESULTSDIR}results.zip ${RAWFN}* +rm -f ${RAWFN}* +[ -f ${BASEDIR}nohup.out ] && cp ${BASEDIR}nohup.out ${RESULTSDIR} +[ -f ${BASEDIR}nohup.out ] && > ${BASEDIR}nohup.out diff --git a/frameworks/Kieker/benchmark-disk-writer-1.9-event.sh b/frameworks/Kieker/benchmark-disk-writer-1.9-event.sh new file mode 100644 index 0000000..e5f11a4 --- /dev/null +++ b/frameworks/Kieker/benchmark-disk-writer-1.9-event.sh @@ -0,0 +1,191 @@ +#!/bin/bash + +JAVABIN="" + +RSCRIPTDIR=bin/r/ +BASEDIR=./ +RESULTSDIR="${BASEDIR}tmp/results-benchmark-kieker-disk-1.9-event/" + +#SLEEPTIME=30 ## 30 +#NUM_LOOPS=10 ## 10 +#THREADS=1 ## 1 +#RECURSIONDEPTH=10 ## 10 +#TOTALCALLS=2000000 ## 2000000 +#METHODTIME=0 ## 0 + +#MOREPARAMS="--quickstart" +MOREPARAMS="${MOREPARAMS} -r kieker.Logger" + +TIME=`expr ${METHODTIME} \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} + ${SLEEPTIME} \* 4 \* ${NUM_LOOPS} \* ${RECURSIONDEPTH} + 50 \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} ` +echo "Experiment will take circa ${TIME} seconds." + +echo "Removing and recreating '$RESULTSDIR'" +(rm -rf ${RESULTSDIR}) && mkdir ${RESULTSDIR} +mkdir ${RESULTSDIR}stat/ + +# Clear kieker.log and initialize logging +rm -f ${BASEDIR}kieker.log +touch ${BASEDIR}kieker.log + +RAWFN="${RESULTSDIR}raw" + +JAVAARGS="-server" +JAVAARGS="${JAVAARGS} -d64" +JAVAARGS="${JAVAARGS} -Xms1G -Xmx4G" +JAVAARGS="${JAVAARGS} -verbose:gc -XX:+PrintCompilation" +#JAVAARGS="${JAVAARGS} -XX:+PrintInlining" +#JAVAARGS="${JAVAARGS} -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation" +#JAVAARGS="${JAVAARGS} -Djava.compiler=NONE" +JAR="-jar dist/OverheadEvaluationMicrobenchmark.jar" + +JAVAARGS_NOINSTR="${JAVAARGS}" +JAVAARGS_LTW="${JAVAARGS} -javaagent:${BASEDIR}lib/kieker-1.9_aspectj.jar -Dorg.aspectj.weaver.showWeaveInfo=false -Daj.weaving.verbose=false -Dorg.aspectj.weaver.loadtime.configuration=META-INF/kieker.aop.xml" +JAVAARGS_KIEKER_DEACTV="${JAVAARGS_LTW} -Dkieker.monitoring.enabled=false -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" +JAVAARGS_KIEKER_NOLOGGING="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" +JAVAARGS_KIEKER_LOGGING1="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.filesystem.AsyncFsWriter -Dkieker.monitoring.writer.filesystem.AsyncFsWriter.customStoragePath=${BASEDIR}tmp" +JAVAARGS_KIEKER_LOGGING2="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.filesystem.AsyncBinaryFsWriter -Dkieker.monitoring.writer.filesystem.AsyncBinaryFsWriter.customStoragePath=${BASEDIR}tmp" + +## Write configuration +uname -a >${RESULTSDIR}configuration.txt +${JAVABIN}java ${JAVAARGS} -version 2>>${RESULTSDIR}configuration.txt +echo "JAVAARGS: ${JAVAARGS}" >>${RESULTSDIR}configuration.txt +echo "" >>${RESULTSDIR}configuration.txt +echo "Runtime: circa ${TIME} seconds" >>${RESULTSDIR}configuration.txt +echo "" >>${RESULTSDIR}configuration.txt +echo "SLEEPTIME=${SLEEPTIME}" >>${RESULTSDIR}configuration.txt +echo "NUM_LOOPS=${NUM_LOOPS}" >>${RESULTSDIR}configuration.txt +echo "TOTALCALLS=${TOTALCALLS}" >>${RESULTSDIR}configuration.txt +echo "METHODTIME=${METHODTIME}" >>${RESULTSDIR}configuration.txt +echo "THREADS=${THREADS}" >>${RESULTSDIR}configuration.txt +echo "RECURSIONDEPTH=${RECURSIONDEPTH}" >>${RESULTSDIR}configuration.txt +sync + +## Execute Benchmark +for ((i=1;i<=${NUM_LOOPS};i+=1)); do + j=${RECURSIONDEPTH} + k=0 + echo "## Starting iteration ${i}/${NUM_LOOPS}" + echo "## Starting iteration ${i}/${NUM_LOOPS}" >>${BASEDIR}kieker.log + + # No instrumentation + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} No instrumentation" + echo " # ${i}.${j}.${k} No instrumentation" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_NOINSTR} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # Deactivated probe + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} Deactivated probe" + echo " # ${i}.${j}.${k} Deactivated probe" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_DEACTV} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # No logging + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} No logging (null writer)" + echo " # ${i}.${j}.${k} No logging (null writer)" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_NOLOGGING} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # Logging 1 + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} Logging 1" + echo " # ${i}.${j}.${k} Logging 1" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING1} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + rm -rf ${BASEDIR}tmp/kieker-* + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # Logging 2 + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} Logging 2" + echo " # ${i}.${j}.${k} Logging 2" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING2} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + rm -rf ${BASEDIR}tmp/kieker-* + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + +done +zip -jqr ${RESULTSDIR}stat.zip ${RESULTSDIR}stat +rm -rf ${RESULTSDIR}stat/ +mv ${BASEDIR}kieker.log ${RESULTSDIR}kieker.log +[ -f ${RESULTSDIR}hotspot-1-${RECURSIONDEPTH}-1.log ] && grep "<task " ${RESULTSDIR}hotspot-*.log >${RESULTSDIR}log.log +[ -f ${BASEDIR}errorlog.txt ] && mv ${BASEDIR}errorlog.txt ${RESULTSDIR} + +## Generate Results file +# Bars +R --vanilla --silent <<EOF +results_fn="${RAWFN}" +outtxt_fn="${RESULTSDIR}results-text.txt" +configs.loop=${NUM_LOOPS} +configs.recursion=c(${RECURSIONDEPTH}) +configs.labels=c("No Probe","Deactivated Probe","Collecting Data","Writer1","Writer2") +results.count=${TOTALCALLS} +results.skip=${TOTALCALLS}/2 +source("${RSCRIPTDIR}stats.r") +EOF + +## Clean up raw results +zip -jqr ${RESULTSDIR}results.zip ${RAWFN}* +rm -f ${RAWFN}* +[ -f ${BASEDIR}nohup.out ] && cp ${BASEDIR}nohup.out ${RESULTSDIR} +[ -f ${BASEDIR}nohup.out ] && > ${BASEDIR}nohup.out diff --git a/frameworks/Kieker/benchmark-disk-writer-1.9-oer.sh b/frameworks/Kieker/benchmark-disk-writer-1.9-oer.sh new file mode 100644 index 0000000..ea5c04b --- /dev/null +++ b/frameworks/Kieker/benchmark-disk-writer-1.9-oer.sh @@ -0,0 +1,191 @@ +#!/bin/bash + +JAVABIN="" + +RSCRIPTDIR=bin/r/ +BASEDIR=./ +RESULTSDIR="${BASEDIR}tmp/results-benchmark-kieker-disk-1.9-oer/" + +#SLEEPTIME=30 ## 30 +#NUM_LOOPS=10 ## 10 +#THREADS=1 ## 1 +#RECURSIONDEPTH=10 ## 10 +#TOTALCALLS=2000000 ## 2000000 +#METHODTIME=0 ## 0 + +#MOREPARAMS="--quickstart" +MOREPARAMS="${MOREPARAMS} -r kieker.Logger" + +TIME=`expr ${METHODTIME} \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} + ${SLEEPTIME} \* 4 \* ${NUM_LOOPS} \* ${RECURSIONDEPTH} + 50 \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} ` +echo "Experiment will take circa ${TIME} seconds." + +echo "Removing and recreating '$RESULTSDIR'" +(rm -rf ${RESULTSDIR}) && mkdir ${RESULTSDIR} +mkdir ${RESULTSDIR}stat/ + +# Clear kieker.log and initialize logging +rm -f ${BASEDIR}kieker.log +touch ${BASEDIR}kieker.log + +RAWFN="${RESULTSDIR}raw" + +JAVAARGS="-server" +JAVAARGS="${JAVAARGS} -d64" +JAVAARGS="${JAVAARGS} -Xms1G -Xmx4G" +JAVAARGS="${JAVAARGS} -verbose:gc -XX:+PrintCompilation" +#JAVAARGS="${JAVAARGS} -XX:+PrintInlining" +#JAVAARGS="${JAVAARGS} -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation" +#JAVAARGS="${JAVAARGS} -Djava.compiler=NONE" +JAR="-jar dist/OverheadEvaluationMicrobenchmark.jar" + +JAVAARGS_NOINSTR="${JAVAARGS}" +JAVAARGS_LTW="${JAVAARGS} -javaagent:${BASEDIR}lib/kieker-1.9_aspectj.jar -Dorg.aspectj.weaver.showWeaveInfo=false -Daj.weaving.verbose=false -Dorg.aspectj.weaver.loadtime.configuration=META-INF/kieker.legacy.aop.xml" +JAVAARGS_KIEKER_DEACTV="${JAVAARGS_LTW} -Dkieker.monitoring.enabled=false -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" +JAVAARGS_KIEKER_NOLOGGING="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.DummyWriter" +JAVAARGS_KIEKER_LOGGING1="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.filesystem.AsyncFsWriter -Dkieker.monitoring.writer.filesystem.AsyncFsWriter.customStoragePath=${BASEDIR}tmp" +JAVAARGS_KIEKER_LOGGING2="${JAVAARGS_LTW} -Dkieker.monitoring.writer=kieker.monitoring.writer.filesystem.AsyncBinaryFsWriter -Dkieker.monitoring.writer.filesystem.AsyncBinaryFsWriter.customStoragePath=${BASEDIR}tmp" + +## Write configuration +uname -a >${RESULTSDIR}configuration.txt +${JAVABIN}java ${JAVAARGS} -version 2>>${RESULTSDIR}configuration.txt +echo "JAVAARGS: ${JAVAARGS}" >>${RESULTSDIR}configuration.txt +echo "" >>${RESULTSDIR}configuration.txt +echo "Runtime: circa ${TIME} seconds" >>${RESULTSDIR}configuration.txt +echo "" >>${RESULTSDIR}configuration.txt +echo "SLEEPTIME=${SLEEPTIME}" >>${RESULTSDIR}configuration.txt +echo "NUM_LOOPS=${NUM_LOOPS}" >>${RESULTSDIR}configuration.txt +echo "TOTALCALLS=${TOTALCALLS}" >>${RESULTSDIR}configuration.txt +echo "METHODTIME=${METHODTIME}" >>${RESULTSDIR}configuration.txt +echo "THREADS=${THREADS}" >>${RESULTSDIR}configuration.txt +echo "RECURSIONDEPTH=${RECURSIONDEPTH}" >>${RESULTSDIR}configuration.txt +sync + +## Execute Benchmark +for ((i=1;i<=${NUM_LOOPS};i+=1)); do + j=${RECURSIONDEPTH} + k=0 + echo "## Starting iteration ${i}/${NUM_LOOPS}" + echo "## Starting iteration ${i}/${NUM_LOOPS}" >>${BASEDIR}kieker.log + + # No instrumentation + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} No instrumentation" + echo " # ${i}.${j}.${k} No instrumentation" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_NOINSTR} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # Deactivated probe + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} Deactivated probe" + echo " # ${i}.${j}.${k} Deactivated probe" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_DEACTV} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # No logging + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} No logging (null writer)" + echo " # ${i}.${j}.${k} No logging (null writer)" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_NOLOGGING} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # Logging 1 + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} Logging 1" + echo " # ${i}.${j}.${k} Logging 1" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING1} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + rm -rf ${BASEDIR}tmp/kieker-* + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + + # Logging 2 + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} Logging 2" + echo " # ${i}.${j}.${k} Logging 2" >>${BASEDIR}kieker.log + sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_KIEKER_LOGGING2} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + kill %sar + rm -rf ${BASEDIR}tmp/kieker-* + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}kieker.log + echo >>${BASEDIR}kieker.log + sync + sleep ${SLEEPTIME} + +done +zip -jqr ${RESULTSDIR}stat.zip ${RESULTSDIR}stat +rm -rf ${RESULTSDIR}stat/ +mv ${BASEDIR}kieker.log ${RESULTSDIR}kieker.log +[ -f ${RESULTSDIR}hotspot-1-${RECURSIONDEPTH}-1.log ] && grep "<task " ${RESULTSDIR}hotspot-*.log >${RESULTSDIR}log.log +[ -f ${BASEDIR}errorlog.txt ] && mv ${BASEDIR}errorlog.txt ${RESULTSDIR} + +## Generate Results file +# Bars +R --vanilla --silent <<EOF +results_fn="${RAWFN}" +outtxt_fn="${RESULTSDIR}results-text.txt" +configs.loop=${NUM_LOOPS} +configs.recursion=c(${RECURSIONDEPTH}) +configs.labels=c("No Probe","Deactivated Probe","Collecting Data","Writer1","Writer2") +results.count=${TOTALCALLS} +results.skip=${TOTALCALLS}/2 +source("${RSCRIPTDIR}stats.r") +EOF + +## Clean up raw results +zip -jqr ${RESULTSDIR}results.zip ${RAWFN}* +rm -f ${RAWFN}* +[ -f ${BASEDIR}nohup.out ] && cp ${BASEDIR}nohup.out ${RESULTSDIR} +[ -f ${BASEDIR}nohup.out ] && > ${BASEDIR}nohup.out diff --git a/frameworks/Kieker/run-benchmark-all.sh b/frameworks/Kieker/run-benchmark-all.sh index 2fc7127..f507000 100644 --- a/frameworks/Kieker/run-benchmark-all.sh +++ b/frameworks/Kieker/run-benchmark-all.sh @@ -9,6 +9,7 @@ METHODTIME=0 ## 0 MOREPARAMS="" #MOREPARAMS="${MOREPARAMS} --quickstart" +source bin/benchmark-disk-writer-1.9-oer.sh source bin/benchmark-disk-writer-1.8-oer.sh source bin/benchmark-disk-writer-1.7-oer.sh source bin/benchmark-disk-writer-1.6-oer.sh @@ -21,6 +22,7 @@ source bin/benchmark-disk-writer-1.0-oer.sh source bin/benchmark-disk-writer-0.95a-oer.sh source bin/benchmark-disk-writer-0.91-oer.sh +source bin/benchmark-disk-writer-1.9-event.sh source bin/benchmark-disk-writer-1.8-event.sh source bin/benchmark-disk-writer-1.7-event.sh source bin/benchmark-disk-writer-1.6-event.sh -- GitLab