File tree Expand file tree Collapse file tree 2 files changed +24
-6
lines changed
performance-testing/scripts Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 14
14
K6_RESULTS_DIR : ./performance-testing/results
15
15
16
16
jobs :
17
- performance-test :
17
+ run :
18
18
runs-on : ubuntu-latest
19
19
20
20
steps :
@@ -34,13 +34,13 @@ jobs:
34
34
run : |
35
35
OTEL_PHP_AUTOLOAD_ENABLED=false docker compose up -d --wait
36
36
docker compose exec php-cli composer install --prefer-dist
37
- docker compose exec php-cli ./vendor/drush/drush/ drush si demo_umami -y
37
+ docker compose exec php-cli drush si demo_umami -y
38
38
39
39
- name : 🧪 K6 - Execute Baseline Performance Test
40
40
run : |
41
41
bash ${K6_SCRIPTS_DIR}/k6_run.sh ${K6_SCENARIO} ${K6_RESULTS_DIR} baseline.json
42
42
43
- - name : ⚙️ Enable OTEL
43
+ - name : ⚙️ Enable OpenTelemetry Auto Instrumentation
44
44
run : |
45
45
docker compose stop
46
46
docker compose up -d --wait
52
52
- name : 📋 Review Test Results
53
53
run : |
54
54
BUDGET=200
55
- bash ${K6_SCRIPTS_DIR}/review_results.sh ${K6_RESULTS_DIR}/baseline.json ${K6_RESULTS_DIR}/otel.json ${BUDGET}
55
+ bash ${K6_SCRIPTS_DIR}/review_results.sh ${K6_RESULTS_DIR}/baseline.json ${K6_RESULTS_DIR}/otel.json ${BUDGET} ${K6_RESULTS_DIR}/comment.txt
56
+
57
+ - name : 📦 Collect Test Result Comment Details
58
+ id : comment
59
+ if : always()
60
+ run : |
61
+ results=$(cat ${K6_RESULTS_DIR}/comment.txt)
62
+ echo "results=$results" >> "$GITHUB_OUTPUT"
63
+
64
+ - name : 📋 Post Test Results to Comment
65
+ uses : peter-evans/create-or-update-comment@v4
66
+ if : always()
67
+ with :
68
+ issue-number : ${{ github.event.pull_request.number }}
69
+ body : |
70
+ Performance Data
71
+ ----------------
72
+ ${{ steps.comment.outputs.results }}
Original file line number Diff line number Diff line change @@ -19,8 +19,7 @@ if [[ "${BASH_SOURCE[0]}" = "$0" ]]; then
19
19
BASELINE_FILE=$1
20
20
OTEL_FILE=$2
21
21
BUDGET=$3
22
-
23
- info " Starting performance review..."
22
+ PRETTY_REPORT=$4
24
23
25
24
fails_baseline=$( cat ${BASELINE_FILE} | jq -r .root_group.checks.ok.fails)
26
25
fails_otel=$( cat ${OTEL_FILE} | jq -r .root_group.checks.ok.fails)
@@ -53,6 +52,8 @@ if [[ "${BASH_SOURCE[0]}" = "$0" ]]; then
53
52
54
53
http_req_duration_diff=` expr $http_req_duration_otel - $http_req_duration_baseline `
55
54
55
+ echo " Before = ${http_req_duration_baseline} \nAfter = ${http_req_duration_otel} \nDifference = ${http_req_duration_diff} " > $PRETTY_REPORT
56
+
56
57
info " http_req_duration diff = ${http_req_duration_diff} "
57
58
58
59
if (( $http_req_duration_diff > $BUDGET )) ; then
You can’t perform that action at this time.
0 commit comments