Skip to content
Snippets Groups Projects
Commit d745c9c1 authored by David Georg Reichelt's avatar David Georg Reichelt
Browse files

Only run jaeger and prometheus if on 64 bit system

parent 2409cf8e
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,8 @@ frameworks/opentelemetry/tmp/
frameworks/opentelemetry/*.txt
frameworks/opentelemetry/MooBench.jar
frameworks/opentelemetry/zipkin/
frameworks/opentelemetry/lib/
frameworks/opentelemetry/jaeger-1.24.0-linux-amd64/
frameworks/opentelemetry/prometheus-2.28.1.linux-amd64/
frameworks/opentelemetry/prometheus-2.28.1.linux-amd64.tar.gz
......
......@@ -14,22 +14,32 @@ function startZipkin {
cd ..
}
function stopZipkin {
kill %1
}
function startPrometheus {
if [ ! -d prometheus-2.28.1.linux-amd64 ]
then
wget https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-amd64.tar.gz
tar -xvf prometheus-2.28.1.linux-amd64.tar.gz
rm prometheus-2.28.1.linux-amd64.tar.gz
fi
cd prometheus-2.28.1.linux-amd64
./prometheus > prometheus.log &
cd ..
}
function stopPrometheus {
function startJaeger {
if [ ! -d jaeger-1.24.0-linux-amd64 ]
then
wget https://github.com/jaegertracing/jaeger/releases/download/v1.24.0/jaeger-1.24.0-linux-amd64.tar.gz
tar -xvf jaeger-1.24.0-linux-amd64.tar.gz
rm jaeger-1.24.0-linux-amd64.tar.gz
fi
cd jaeger-1.24.0-linux-amd64
./jaeger-all-in-one > jaeger.log &
cd ..
}
function stopBackgroundProcess {
kill %1
}
......@@ -38,6 +48,30 @@ function getSum {
awk '{sum += $1; square += $1^2} END {print "Average: "sum/NR" Standard Deviation: "sqrt(square / NR - (sum/NR)^2)" Count: "NR}'
}
function printIntermediaryResults {
echo -n "Intermediary results uninstrumented"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-1.csv | awk -F';' '{print $2}' | getSum
echo -n "Intermediary results opentelemetry Logging Deactivated"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-2.csv | awk -F';' '{print $2}' | getSum
echo -n "Intermediary results opentelemetry Logging"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-3.csv | awk -F';' '{print $2}' | getSum
echo -n "Intermediary results opentelemetry Zipkin"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-4.csv | awk -F';' '{print $2}' | getSum
MACHINE_TYPE=`uname -m`;
if [ ${MACHINE_TYPE} == 'x86_64' ]
then
echo -n "Intermediary results opentelemetry Jaeger"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-5.csv | awk -F';' '{print $2}' | getSum
echo -n "Intermediary results opentelemetry Prometheus"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-6.csv | awk -F';' '{print $2}' | getSum
fi
}
JAVABIN=""
......@@ -89,6 +123,7 @@ JAVAARGS_OPENTELEMETRY_BASIC="${JAVAARGS} -javaagent:${BASEDIR}lib/opentelemetry
JAVAARGS_OPENTELEMETRY_LOGGING_DEACTIVATED="${JAVAARGS_OPENTELEMETRY_BASIC} -Dotel.traces.exporter=logging -Dotel.traces.sampler=always_off"
JAVAARGS_OPENTELEMETRY_LOGGING="${JAVAARGS_OPENTELEMETRY_BASIC} -Dotel.traces.exporter=logging"
JAVAARGS_OPENTELEMETRY_ZIPKIN="${JAVAARGS_OPENTELEMETRY_BASIC} -Dotel.traces.exporter=zipkin"
JAVAARGS_OPENTELEMETRY_JAEGER="${JAVAARGS_OPENTELEMETRY_BASIC} -Dotel.traces.exporter=jaeger"
JAVAARGS_OPENTELEMETRY_PROMETHEUS="${JAVAARGS_OPENTELEMETRY_BASIC} -Dotel.traces.exporter=prometheus"
......@@ -184,43 +219,55 @@ for ((i=1;i<=${NUM_LOOPS};i+=1)); do
[ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log
echo >>${BASEDIR}opentelemetry.log
echo >>${BASEDIR}opentelemetry.log
stopZipkin
stopBackgroundProcess
sync
sleep ${SLEEPTIME}
# OpenTelemetry Instrumentation Prometheus
k=`expr ${k} + 1`
startPrometheus
echo " # ${i}.${j}.${k} OpenTelemetry Instrumentation Prometheus"
echo " # ${i}.${j}.${k} OpenTelemetry Instrumentation Prometheus" >>${BASEDIR}opentelemetry.log
${JAVABIN}java ${JAVAARGS_OPENTELEMETRY_PROMETHEUS} ${JAR} \
--output-filename ${RAWFN}-${i}-${j}-${k}.csv \
--total-calls ${TOTALCALLS} \
--method-time ${METHODTIME} \
--total-threads ${THREADS} \
--recursion-depth ${j} \
${MOREPARAMS} &> ${RESULTSDIR}output_"$i"_opentelemetry_prometheus.txt
[ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log
echo >>${BASEDIR}opentelemetry.log
echo >>${BASEDIR}opentelemetry.log
stopPrometheus
sync
sleep ${SLEEPTIME}
MACHINE_TYPE=`uname -m`;
if [ ${MACHINE_TYPE} == 'x86_64' ]
then
# OpenTelemetry Instrumentation Jaeger
k=`expr ${k} + 1`
startPrometheus
echo " # ${i}.${j}.${k} OpenTelemetry Instrumentation Jaeger"
echo " # ${i}.${j}.${k} OpenTelemetry Instrumentation Jaeger" >>${BASEDIR}opentelemetry.log
${JAVABIN}java ${JAVAARGS_OPENTELEMETRY_JAEGER} ${JAR} \
--output-filename ${RAWFN}-${i}-${j}-${k}.csv \
--total-calls ${TOTALCALLS} \
--method-time ${METHODTIME} \
--total-threads ${THREADS} \
--recursion-depth ${j} \
${MOREPARAMS} &> ${RESULTSDIR}output_"$i"_opentelemetry_prometheus.txt
[ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log
echo >>${BASEDIR}opentelemetry.log
echo >>${BASEDIR}opentelemetry.log
stopBackgroundProcess
sync
sleep ${SLEEPTIME}
# OpenTelemetry Instrumentation Prometheus
k=`expr ${k} + 1`
startPrometheus
echo " # ${i}.${j}.${k} OpenTelemetry Instrumentation Prometheus"
echo " # ${i}.${j}.${k} OpenTelemetry Instrumentation Prometheus" >>${BASEDIR}opentelemetry.log
${JAVABIN}java ${JAVAARGS_OPENTELEMETRY_PROMETHEUS} ${JAR} \
--output-filename ${RAWFN}-${i}-${j}-${k}.csv \
--total-calls ${TOTALCALLS} \
--method-time ${METHODTIME} \
--total-threads ${THREADS} \
--recursion-depth ${j} \
${MOREPARAMS} &> ${RESULTSDIR}output_"$i"_opentelemetry_prometheus.txt
[ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log
echo >>${BASEDIR}opentelemetry.log
echo >>${BASEDIR}opentelemetry.log
stopBackgroundProcess
sync
sleep ${SLEEPTIME}
else
echo "No 64 Bit System; skipping Prometheus"
fi
echo -n "Intermediary results uninstrumented"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-1.csv | awk -F';' '{print $2}' | getSum
echo -n "Intermediary results opentelemetry Logging Deactivated"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-2.csv | awk -F';' '{print $2}' | getSum
echo -n "Intermediary results opentelemetry Logging"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-3.csv | awk -F';' '{print $2}' | getSum
echo -n "Intermediary results opentelemetry Zipkin"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-4.csv | awk -F';' '{print $2}' | getSum
echo -n "Intermediary results opentelemetry Prometheus"
cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-5.csv | awk -F';' '{print $2}' | getSum
printIntermediaryResults
done
#zip -jqr ${RESULTSDIR}stat.zip ${RESULTSDIR}stat
#rm -rf ${RESULTSDIR}stat/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment