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

Refactor OpenTelemetry: Use case instead of multiple ifs

parent a8098446
No related branches found
No related tags found
No related merge requests found
......@@ -42,32 +42,15 @@ function cleanup {
function executeBenchmark() {
for index in $MOOBENCH_CONFIGURATIONS
do
if [ $index == 0 ]
then
runNoInstrumentation 0
cleanup
fi
case $index in
0) runNoInstrumentation 0 ;;
1) runOpenTelemetryNoLogging 1 ;;
2) runOpenTelemetryLogging 2 ;;
3) runOpenTelemetryZipkin 3 ;;
4) runOpenTelemetryPrometheus 4 ;;
esac
if [ $index == 1 ]
then
runOpenTelemetryNoLogging 1
cleanup
fi
if [ $index == 2 ]
then
runOpenTelemetryLogging 2
cleanup
fi
if [ $index == 3 ]
then
runOpenTelemetryZipkin 3
cleanup
fi
if [ $index == 4 ]
then
runOpenTelemetryPrometheus 4
cleanup
fi
cleanup
done
}
......
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