From bf6e805eb31306bf2482fd3c93f70590b06c334d Mon Sep 17 00:00:00 2001
From: Valera V Harseko <vharseko@3a-systems.ru>
Date: Wed, 24 Jun 2026 17:27:29 +0000
Subject: [PATCH] Merge branch 'features/performance-build' into features/docker-noble

---
 .github/benchmark/compare-opendj.sh |   10 +++++++++-
 .github/workflows/build.yml         |   26 ++++++++++++++++++++++++++
 .github/benchmark/summary.sh        |    4 ++--
 3 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/.github/benchmark/compare-opendj.sh b/.github/benchmark/compare-opendj.sh
index 55fd033..1825921 100644
--- a/.github/benchmark/compare-opendj.sh
+++ b/.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
diff --git a/.github/benchmark/summary.sh b/.github/benchmark/summary.sh
index b2b59f9..9ea5ce4 100644
--- a/.github/benchmark/summary.sh
+++ b/.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)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d5feda9..23792b4 100644
--- a/.github/workflows/build.yml
+++ b/.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

--
Gitblit v1.10.0