File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6565 - 'scripts/performance-tests-kevm.sh'
6666 - 'scripts/performance-tests-kontrol.sh'
6767 - 'scripts/compare.py'
68+ - 'scripts/collect-downstream-perf-results.sh'
69+ - 'scripts/downstream-perf-lib.sh'
70+ - '.github/actions/downstream-perf-suite/**'
71+ - '.github/actionlint.yaml'
6872 - '.github/workflows/downstream-perf.yml'
6973
7074 - name : ' Decide suites'
@@ -199,13 +203,15 @@ jobs:
199203 - name : ' Download KEVM results'
200204 if : ${{ needs.select.outputs.run_kevm == 'true' && needs.kevm.result != 'cancelled' && needs.kevm.result != 'skipped' }}
201205 uses : actions/download-artifact@v4
206+ continue-on-error : true
202207 with :
203208 name : kevm-downstream-perf-${{ github.run_id }}
204209 path : downstream-perf/kevm
205210
206211 - name : ' Download Kontrol results'
207212 if : ${{ needs.select.outputs.run_kontrol == 'true' && needs.kontrol.result != 'cancelled' && needs.kontrol.result != 'skipped' }}
208213 uses : actions/download-artifact@v4
214+ continue-on-error : true
209215 with :
210216 name : kontrol-downstream-perf-${{ github.run_id }}
211217 path : downstream-perf/kontrol
Original file line number Diff line number Diff line change @@ -245,6 +245,9 @@ jobs:
245245 fetch-depth : 0
246246 submodules : recursive
247247
248+ - name : ' Test downstream perf shell helpers'
249+ run : bash scripts/test-downstream-perf-lib.sh
250+
248251 - name : ' Install Nix'
249252 uses : cachix/install-nix-action@v25
250253 with :
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ downstream_perf_write_manifest_snapshot() {
4444
4545downstream_perf_baseline_commit () {
4646 local baseline_ref=$1
47- git merge-base " $baseline_ref " HEAD
47+ git rev-parse " $baseline_ref "
4848}
4949
5050downstream_perf_run_and_log () {
@@ -55,7 +55,9 @@ downstream_perf_run_and_log() {
5555 start_time=$( date +%s)
5656
5757 set +e
58- " $@ " | tee " $logfile "
58+ # Keep stdout reserved for machine-readable "status duration" output.
59+ # Stream command output to the console via stderr while preserving a full log file.
60+ " $@ " 2>&1 | tee " $logfile " >&2
5961 status=${PIPESTATUS[0]}
6062 set -e
6163
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ SCRIPT_DIR=" $( dirname " $( readlink -f " $0 " ) " ) "
5+ . " $SCRIPT_DIR /downstream-perf-lib.sh"
6+
7+ TEMPD=$( mktemp -d)
8+ trap ' rm -rf "$TEMPD"' EXIT
9+
10+ LOGFILE=" $TEMPD /helper.log"
11+
12+ read -r status duration < <(
13+ downstream_perf_run_and_log \
14+ " $LOGFILE " \
15+ bash -c " echo 'feature output line 1'; echo 'feature output line 2'; echo 'feature warning' >&2; exit 7"
16+ )
17+
18+ if [[ $status != " 7" ]]; then
19+ echo " Expected status 7, got '$status '" >&2
20+ exit 1
21+ fi
22+
23+ if [[ ! $duration =~ ^[0-9]+$ ]]; then
24+ echo " Expected numeric duration, got '$duration '" >&2
25+ exit 1
26+ fi
27+
28+ if [[ ! -s $LOGFILE ]]; then
29+ echo " Expected non-empty logfile at '$LOGFILE '" >&2
30+ exit 1
31+ fi
32+
33+ grep -q " feature output line 1" " $LOGFILE "
34+ grep -q " feature output line 2" " $LOGFILE "
35+ grep -q " feature warning" " $LOGFILE "
You can’t perform that action at this time.
0 commit comments