From 6c29aab12466ad5ac2b5ef832939cdbe5d6ae545 Mon Sep 17 00:00:00 2001 From: David Georg Reichelt <davidgeorg_reichelt@dagere.de> Date: Sat, 14 Jan 2023 20:56:05 +0100 Subject: [PATCH] Make parameters configurable via environment variables again; implement github action for OpenTelemetry test --- .../workflows/executeOpenTelemetryJava.yaml | 42 +++++++++++++++++++ .gitignore | 4 ++ common-functions.sh | 28 +++++++++---- experiment.rc | 9 ---- 4 files changed, 67 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/executeOpenTelemetryJava.yaml diff --git a/.github/workflows/executeOpenTelemetryJava.yaml b/.github/workflows/executeOpenTelemetryJava.yaml new file mode 100644 index 0000000..1a9607b --- /dev/null +++ b/.github/workflows/executeOpenTelemetryJava.yaml @@ -0,0 +1,42 @@ +--- +name: Build MooBench for OpenTelemetry execution check +on: + - push + - pull_request + - workflow_dispatch +jobs: + build: + strategy: + matrix: + os: + - ubuntu-latest + java: + - 1.8 + - 11 + - 17 + fail-fast: false + runs-on: ${{ matrix.os }} + name: Java ${{ matrix.java }} OS ${{ matrix.os }} sample + steps: + - uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Assemble Project + run: | + ./gradlew assemble + cd frameworks/OpenTelemetry-java/ + export SLEEP_TIME=0 + export NUM_OF_LOOPS=1 + export TOTAL_NUM_OF_CALLS=10 + export RECURSION_DEPTH=10 + ./benchmark.sh + unzip results-OpenTelemetry-java/results.zip + measuredValues=$(cat raw-1-10-* | wc -l) + if [ $measuredValues -ne 50 ] + then + echo "It should be 50 measured values, but was $measuredValues" + exit 1 + fi + diff --git a/.gitignore b/.gitignore index c98caea..5b5660c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,7 @@ /.gradle/ /build/ /benchmark/** + +# Do not store measurement results +frameworks/OpenTelemetry-java/raw* +frameworks/OpenTelemetry-java/results-OpenTelemetry-java/ diff --git a/common-functions.sh b/common-functions.sh index d8cd9ba..b21d084 100755 --- a/common-functions.sh +++ b/common-functions.sh @@ -238,12 +238,26 @@ RESULTS_DIR="${BASE_DIR}/results-${FRAMEWORK_NAME}" RAWFN="${RESULTS_DIR}/raw" # Initialize all unset parameters -SLEEP_TIME=30 ## 30 -NUM_OF_LOOPS=10 ## 10 -THREADS=1 ## 1 -RECURSION_DEPTH=10 ## 10 -TOTAL_NUM_OF_CALLS=2000000 ## 2 000 000 -METHOD_TIME=0 ## 500 000 -DEBUG=false ## false +if [ -z $SLEEP_TIME ]; then + SLEEP_TIME=30 ## 30 +fi +if [ -z $NUM_OF_LOOPS ]; then + NUM_OF_LOOPS=10 ## 10 +fi +if [ -z $THREADS ]; then + THREADS=1 ## 1 +fi +if [ -z $RECURSION_DEPTH ]; then + RECURSION_DEPTH=10 ## 10 +fi +if [ -z $TOTAL_NUM_OF_CALLS ]; then + TOTAL_NUM_OF_CALLS=2000000 ## 2000000 +fi +if [ -z $METHOD_TIME ]; then + METHOD_TIME=0 ## 500000 +fi +if [ -z $DEBUG ]; then + DEBUG=false ## false +fi # end diff --git a/experiment.rc b/experiment.rc index 28a7c1e..ca84682 100644 --- a/experiment.rc +++ b/experiment.rc @@ -1,12 +1,3 @@ MOOBENCH_ARCHIVE="${BASE_DIR}/tools/benchmark/build/distributions/benchmark.tar" COMPILE_RESULTS_ARCHIVE="${BASE_DIR}/tools/compile-results/build/distributions/compile-results.tar" COMPILE_RESULTS_BIN="${BASE_DIR}/compile-results/bin/compile-results" - -export SLEEP_TIME=30 -export NUM_OF_LOOPS=10 -export THREADS=1 -export RECURSION_DEPTH=10 -export TOTAL_NUM_OF_CALLS=200000 -export METHOD_TIME=0 -export DEBUG=false - -- GitLab