Skip to content

Commit 3599213

Browse files
committed
qa-tests: add summary in RPC Performance Tests Latest
1 parent f99f3ed commit 3599213

File tree

1 file changed

+44
-11
lines changed

1 file changed

+44
-11
lines changed

.github/workflows/qa-rpc-performance-comparison-tests.yml renamed to .github/workflows/qa-rpc-performance-tests-latest.yml

Lines changed: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
required: false
1010
default: false
1111
schedule:
12-
- cron: '0 2 * * *' # Run daily at 02:00 UTC
12+
- cron: '0 2 * * *' # Run daily at 02:00 UTC
1313

1414
concurrency:
1515
group: rpc-performance-latest-${{ github.ref }}
@@ -241,6 +241,15 @@ jobs:
241241
bin_past_test_dir=$RPC_PAST_TEST_DIR/${CHAIN}_bin
242242
rm -rf $bin_past_test_dir # we want only the latest binary files
243243
mkdir -p $bin_past_test_dir
244+
245+
# Define result_dir (same for all run_perf calls since workspace and network are constant)
246+
result_dir=${{runner.workspace}}/rpc-tests/perf/reports/$CHAIN
247+
mkdir -p $result_dir
248+
echo "result_dir=$result_dir" >> $GITHUB_ENV
249+
250+
# Initialize output log file
251+
output_log=$result_dir/output.log
252+
> $output_log
244253
245254
run_perf () {
246255
workspace=$1
@@ -249,10 +258,9 @@ jobs:
249258
pattern=$4
250259
sequence=$5
251260
client=$6
252-
253-
result_dir=$workspace/rpc-tests/perf/reports/$network
261+
254262
result_file=$client-$method-result.json
255-
263+
256264
# clean temporary area
257265
cd $workspace/rpc-tests/perf
258266
rm -rf ./reports/$network
@@ -267,11 +275,11 @@ jobs:
267275
--test-mode 2 \
268276
--test-report \
269277
--json-report $result_dir/$result_file \
270-
--testing-daemon $client
278+
--testing-daemon $client 2>&1 | tee -a $output_log
279+
280+
# Capture test runner script exit status (use PIPESTATUS since we're piping to tee)
281+
perf_exit_status=${PIPESTATUS[0]}
271282
272-
# Capture test runner script exit status
273-
perf_exit_status=$?
274-
275283
# Detect the pre-built db version
276284
if [ "$client" == "erigon" ]; then
277285
db_version=$(python3 $ERIGON_QA_PATH/test_system/qa-tests/uploads/prod_info.py $ERIGON_REFERENCE_DIR/production.ini production erigon_repo_commit)
@@ -290,7 +298,7 @@ jobs:
290298
else
291299
echo "::warning::vegeta binary reports directory '$workspace/rpc-tests/perf/reports/bin' not found; skipping copy."
292300
fi
293-
301+
294302
echo "Execute Latency Percentile HDR Analysis"
295303
cd $result_dir
296304
python3 $ERIGON_QA_PATH/test_system/qa-tests/rpc-tests/perf_hdr_analysis.py \
@@ -316,7 +324,7 @@ jobs:
316324
branch_name="release"
317325
commit_hash=$commit
318326
fi
319-
327+
320328
echo branch_name=$branch_name
321329
echo commit_hash=$commit_hash
322330
echo method=$method
@@ -334,7 +342,7 @@ jobs:
334342
--db_version $db_version \
335343
--outcome $outcome \
336344
--result_file $result_dir/$result_file
337-
345+
338346
if [ $? -ne 0 ]; then
339347
failed_test=1
340348
echo "Failure saving test results on DB"
@@ -369,6 +377,31 @@ jobs:
369377
exit 1
370378
fi
371379
380+
- name: Generate Summary
381+
if: always() && steps.test_step.outputs.test_executed == 'true'
382+
run: |
383+
SUMMARY_FILE="${{ env.past_test_dir }}/summary.md"
384+
LOG_FILE="${{ env.result_dir }}/output.log"
385+
386+
cat << 'EOF' > $SUMMARY_FILE
387+
# ${{ github.workflow }} Report
388+
389+
## Test Configuration
390+
- **Chain:** ${{ env.CHAIN }}
391+
- **Client:** ${{ matrix.client }}
392+
- **Result:** ${{ steps.test_step.outputs.TEST_RESULT }}
393+
394+
## Test Output
395+
```
396+
EOF
397+
398+
cat $LOG_FILE >> $SUMMARY_FILE
399+
400+
echo '```' >> $SUMMARY_FILE
401+
402+
cat $SUMMARY_FILE
403+
cat $SUMMARY_FILE >> $GITHUB_STEP_SUMMARY
404+
372405
- name: Upload test results
373406
if: (matrix.client == 'erigon' || needs.setup.outputs.run_geth == 'true') && steps.test_step.outputs.test_executed == 'true'
374407
uses: actions/upload-artifact@v6

0 commit comments

Comments
 (0)