Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moobench
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SustainKieker
moobench
Commits
ecff4abc
Commit
ecff4abc
authored
3 years ago
by
David Georg Reichelt
Browse files
Options
Downloads
Patches
Plain Diff
Extract methods for better readability
parent
aa3a0c51
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frameworks/opentelemetry/benchmark.sh
+120
-115
120 additions, 115 deletions
frameworks/opentelemetry/benchmark.sh
with
120 additions
and
115 deletions
frameworks/opentelemetry/benchmark.sh
+
120
−
115
View file @
ecff4abc
...
...
@@ -22,7 +22,7 @@ function startPrometheus {
rm
prometheus-2.28.1.linux-amd64.tar.gz
fi
cd
prometheus-2.28.1.linux-amd64
./prometheus
>
prometheus.log &
./prometheus
&
> prometheus.log &
cd
..
}
...
...
@@ -35,7 +35,7 @@ function startJaeger {
rm
jaeger-1.24.0-linux-amd64.tar.gz
fi
cd
jaeger-1.24.0-linux-amd64
./jaeger-all-in-one
>
jaeger.log &
./jaeger-all-in-one
&
> jaeger.log &
cd
..
}
...
...
@@ -43,6 +43,107 @@ function stopBackgroundProcess {
kill
%1
}
function
cleanup
{
[
-f
${
BASEDIR
}
hotspot.log
]
&&
mv
${
BASEDIR
}
hotspot.log
${
RESULTSDIR
}
hotspot-
${
i
}
-
${
j
}
-
${
k
}
.log
echo
>>
${
BASEDIR
}
opentelemetry.log
echo
>>
${
BASEDIR
}
opentelemetry.log
sync
sleep
${
SLEEPTIME
}
}
function
runNoInstrumentation
{
# No instrumentation
k
=
`
expr
${
k
}
+ 1
`
echo
" #
${
i
}
.
${
j
}
.
${
k
}
No instrumentation"
echo
" #
${
i
}
.
${
j
}
.
${
k
}
No instrumentation"
>>
${
BASEDIR
}
opentelemetry.log
${
JAVABIN
}
java
${
JAVAARGS_NOINSTR
}
${
JAR
}
\
--output-filename
${
RAWFN
}
-
${
i
}
-
${
j
}
-
${
k
}
.csv
\
--total-calls
${
TOTALCALLS
}
\
--method-time
${
METHODTIME
}
\
--total-threads
${
THREADS
}
\
--recursion-depth
${
j
}
\
${
MOREPARAMS
}
&>
${
RESULTSDIR
}
output_
"
$i
"
_uninstrumented.txt
}
function
runOpenTelemetryNoLogging
{
# OpenTelemetry Instrumentation Logging Deactivated
k
=
`
expr
${
k
}
+ 1
`
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Logging Deactivated"
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Logging Deactivated"
>>
${
BASEDIR
}
opentelemetry.log
${
JAVABIN
}
java
${
JAVAARGS_OPENTELEMETRY_LOGGING_DEACTIVATED
}
${
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.txt
}
function
runOpenTelemetryLogging
{
# OpenTelemetry Instrumentation Logging
k
=
`
expr
${
k
}
+ 1
`
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Logging"
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Logging"
>>
${
BASEDIR
}
opentelemetry.log
${
JAVABIN
}
java
${
JAVAARGS_OPENTELEMETRY_LOGGING
}
${
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_logging.txt
if
[
!
"
$DEBUG
"
=
true
]
then
rm
${
RESULTSDIR
}
output_
"
$i
"
_opentelemetry_logging.txt
fi
}
function
runOpenTelemetryZipkin
{
# OpenTelemetry Instrumentation Zipkin
k
=
`
expr
${
k
}
+ 1
`
startZipkin
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Zipkin"
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Zipkin"
>>
${
BASEDIR
}
opentelemetry.log
${
JAVABIN
}
java
${
JAVAARGS_OPENTELEMETRY_ZIPKIN
}
${
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_zipkin.txt
stopBackgroundProcess
}
function
runOpenTelemetryJaeger
{
# OpenTelemetry Instrumentation Jaeger
k
=
`
expr
${
k
}
+ 1
`
startJaeger
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
stopBackgroundProcess
}
function
runOpenTelemetryPrometheus
{
# 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
stopBackgroundProcess
}
function
getSum
{
awk
'{sum += $1; square += $1^2} END {print "Average: "sum/NR" Standard Deviation: "sqrt(square / NR - (sum/NR)^2)" Count: "NR}'
...
...
@@ -67,8 +168,9 @@ function printIntermediaryResults {
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
# Prometheus does not work currently
#echo -n "Intermediary results opentelemetry Prometheus"
#cat tmp/results-opentelemetry/raw-*-$RECURSIONDEPTH-6.csv | awk -F';' '{print $2}' | getSum
fi
}
...
...
@@ -114,7 +216,7 @@ JAR="-jar MooBench.jar"
if
[
!
-f
"MooBench.jar"
]
then
echo
"MooBench.jar missing; please build it first using ./gradlew assemble in the
main
folder"
echo
"MooBench.jar missing; please build it first using
.
./gradlew assemble in the
benchmark
folder"
exit
1
fi
...
...
@@ -156,124 +258,27 @@ for ((i=1;i<=${NUM_LOOPS};i+=1)); do
echo
"## Starting iteration
${
i
}
/
${
NUM_LOOPS
}
"
echo
"## Starting iteration
${
i
}
/
${
NUM_LOOPS
}
"
>>
${
BASEDIR
}
opentelemetry.log
# No instrumentation
k
=
`
expr
${
k
}
+ 1
`
echo
" #
${
i
}
.
${
j
}
.
${
k
}
No instrumentation"
echo
" #
${
i
}
.
${
j
}
.
${
k
}
No instrumentation"
>>
${
BASEDIR
}
opentelemetry.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
\
--total-calls
${
TOTALCALLS
}
\
--method-time
${
METHODTIME
}
\
--total-threads
${
THREADS
}
\
--recursion-depth
${
j
}
\
${
MOREPARAMS
}
&>
${
RESULTSDIR
}
output_
"
$i
"
_uninstrumented.txt
#kill %sar
[
-f
${
BASEDIR
}
hotspot.log
]
&&
mv
${
BASEDIR
}
hotspot.log
${
RESULTSDIR
}
hotspot-
${
i
}
-
${
j
}
-
${
k
}
.log
echo
>>
${
BASEDIR
}
opentelemetry.log
echo
>>
${
BASEDIR
}
opentelemetry.log
sync
sleep
${
SLEEPTIME
}
runNoInstrumentation
cleanup
# OpenTelemetry Instrumentation Logging Deactivated
k
=
`
expr
${
k
}
+ 1
`
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Logging Deactivated"
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Logging Deactivated"
>>
${
BASEDIR
}
opentelemetry.log
#sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 &
${
JAVABIN
}
java
${
JAVAARGS_OPENTELEMETRY_LOGGING_DEACTIVATED
}
${
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.txt
#kill %sar
[
-f
${
BASEDIR
}
hotspot.log
]
&&
mv
${
BASEDIR
}
hotspot.log
${
RESULTSDIR
}
hotspot-
${
i
}
-
${
j
}
-
${
k
}
.log
echo
>>
${
BASEDIR
}
opentelemetry.log
echo
>>
${
BASEDIR
}
opentelemetry.log
sync
sleep
${
SLEEPTIME
}
runOpenTelemetryNoLogging
cleanup
# OpenTelemetry Instrumentation Logging
k
=
`
expr
${
k
}
+ 1
`
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Logging"
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Logging"
>>
${
BASEDIR
}
opentelemetry.log
${
JAVABIN
}
java
${
JAVAARGS_OPENTELEMETRY_LOGGING
}
${
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_logging.txt
[
-f
${
BASEDIR
}
hotspot.log
]
&&
mv
${
BASEDIR
}
hotspot.log
${
RESULTSDIR
}
hotspot-
${
i
}
-
${
j
}
-
${
k
}
.log
echo
>>
${
BASEDIR
}
opentelemetry.log
echo
>>
${
BASEDIR
}
opentelemetry.log
if
[
!
"
$DEBUG
"
=
true
]
then
rm
${
RESULTSDIR
}
output_
"
$i
"
_opentelemetry_logging.txt
fi
sync
sleep
${
SLEEPTIME
}
runOpenTelemetryLogging
cleanup
# OpenTelemetry Instrumentation Zipkin
k
=
`
expr
${
k
}
+ 1
`
startZipkin
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Zipkin"
echo
" #
${
i
}
.
${
j
}
.
${
k
}
OpenTelemetry Instrumentation Zipkin"
>>
${
BASEDIR
}
opentelemetry.log
${
JAVABIN
}
java
${
JAVAARGS_OPENTELEMETRY_ZIPKIN
}
${
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_zipkin.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
}
runOpenTelemetryZipkin
cleanup
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
}
runOpenTelemetryJaeger
cleanup
# 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
}
# Prometheus does not work currently
#runOpenTelemetryPrometheus
#cleanup
else
echo
"No 64 Bit System; skipping Prometheus"
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment