mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valera V Harseko
12 hours ago bf6e805eb31306bf2482fd3c93f70590b06c334d
Merge branch 'features/performance-build' into features/docker-noble
3 files modified
40 ■■■■■ changed files
.github/benchmark/compare-opendj.sh 10 ●●●●● patch | view | raw | blame | history
.github/benchmark/summary.sh 4 ●●●● patch | view | raw | blame | history
.github/workflows/build.yml 26 ●●●●● patch | view | raw | blame | history
.github/benchmark/compare-opendj.sh
@@ -73,8 +73,16 @@
      -Jadminbinddn="cn=Directory Manager" -Jadminbindpw=password -Jbenchpw="$BENCHPW" \
      -Jthreads="$THREADS" -Jduration="$DURATION" -Jrampup=0 \
      -Jjmeter.reportgenerator.sample_filter='^(?!ADMIN_CONNECT).*' \
      -l "$out.jtl" -e -o "$out" >/dev/null 2>&1 || true
      -l "$out.jtl" -e -o "$out" > "$out.jmeter.out" 2>&1 || true
    docker logs opendj-bench > "$out.docker.log" 2>&1 || true
    # surface distinct error messages to the step log (stderr; stdout carries the version)
    if [ -f "$out.jtl" ]; then
      local errs
      errs="$(awk -F',' 'NR==1{for(i=1;i<=NF;i++)h[$i]=i; next}
                         tolower($h["success"])=="false"{print $h["label"]" | "$h["responseCode"]" | "$h["responseMessage"]}' \
              "$out.jtl" 2>/dev/null | sort | uniq -c | sort -rn | head -10)"
      [ -z "$errs" ] || { echo "[$out] errors (count | op | code | message):" >&2; echo "$errs" >&2; }
    fi
  else
    echo "ERROR: failed to start image $image" >&2
  fi
.github/benchmark/summary.sh
@@ -115,8 +115,8 @@
echo "_Per-operation throughput is not charted: every op runs once per loop iteration, so each"
echo "op's throughput just equals the loop rate. The meaningful throughput is the aggregate._"
echo ""
TP_CFG="{\"type\":\"horizontalBar\",\"data\":{\"labels\":[\"${A_NAME}\",\"${B_NAME}\"],\"datasets\":[{\"label\":\"tests/s\",\"backgroundColor\":[\"$A_COLOR\",\"$B_COLOR\"],\"data\":[${a_tot_tp},${b_tot_tp}]}]},\"options\":{\"legend\":{\"display\":false},\"title\":{\"display\":true,\"text\":\"Total throughput (tests/s)\"}}}"
echo "![Total throughput (tests/s)]($(qc 700 280 "$TP_CFG"))"
TP_CFG="{\"type\":\"bar\",\"data\":{\"labels\":[\"${A_NAME}\",\"${B_NAME}\"],\"datasets\":[{\"label\":\"tests/s\",\"backgroundColor\":[\"$A_COLOR\",\"$B_COLOR\"],\"data\":[${a_tot_tp},${b_tot_tp}]}]},\"options\":{\"legend\":{\"display\":false},\"title\":{\"display\":true,\"text\":\"Total throughput (tests/s)\"}}}"
echo "![Total throughput (tests/s)]($(qc 500 320 "$TP_CFG"))"
echo ""
# ---------------------------------------------------------------- Latency chart (grouped bars)
.github/workflows/build.yml
@@ -383,6 +383,19 @@
          THREADS=200 DURATION=150 bash .github/benchmark/compare-opendj.sh \
            "Build"   localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }} \
            "Release" openidentityplatform/opendj:latest
      - name: Upload benchmark artifacts
        if: always()
        uses: actions/upload-artifact@v7
        with:
          name: benchmark-build-vs-release
          path: |
            a/
            b/
            *.jtl
            *.docker.log
            *.jmeter.out
          if-no-files-found: warn
          retention-days: 3
  build-docker-alpine:
    needs: build-maven
@@ -469,3 +482,16 @@
          THREADS=200 DURATION=150 bash .github/benchmark/compare-opendj.sh \
            "Build-alpine"   localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}-alpine \
            "Release-alpine" openidentityplatform/opendj:alpine
      - name: Upload benchmark artifacts
        if: always()
        uses: actions/upload-artifact@v7
        with:
          name: benchmark-build-vs-release-alpine
          path: |
            a/
            b/
            *.jtl
            *.docker.log
            *.jmeter.out
          if-no-files-found: warn
          retention-days: 90