File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 - test/**
2626 - ' !**.md'
2727
28+ defaults :
29+ run :
30+ shell : bash
31+
2832concurrency :
2933 # Terminate all previous runs of the same workflow for pull requests
3034 group : test-${{ github.head_ref || github.run_id }}
@@ -152,10 +156,34 @@ jobs:
152156 latest_tag=$(git tag --merged HEAD --sort=-creatordate "v*" | head -n1)
153157 fi
154158 postgrest-loadtest-against -k ${{ matrix.kind }} "$TARGET_BRANCH" "$latest_tag"
159+
160+ - name : Report P50
161+ # This step checks whether any red cross indicators (:x:) are present in the step summary.
162+ # The loadtest reporter writes them when any of individual steps fails the performance
163+ # regression threshold.
164+ run : |
165+ postgrest-loadtest-report -g ${{ matrix.kind }} -p 50 \
166+ | tee "$GITHUB_STEP_SUMMARY" \
167+ | grep -v ':x:'
168+
169+ - name : Report P0
170+ if : always()
171+ run : |
155172 postgrest-loadtest-report -g ${{ matrix.kind }} -p 0 >> "$GITHUB_STEP_SUMMARY"
156- postgrest-loadtest-report -g ${{ matrix.kind }} -p 50 >> "$GITHUB_STEP_SUMMARY"
173+
174+ - name : Report P90
175+ if : always()
176+ run : |
157177 postgrest-loadtest-report -g ${{ matrix.kind }} -p 90 >> "$GITHUB_STEP_SUMMARY"
178+
179+ - name : Report P95
180+ if : always()
181+ run : |
158182 postgrest-loadtest-report -g ${{ matrix.kind }} -p 95 >> "$GITHUB_STEP_SUMMARY"
183+
184+ - name : Report CPU/MEM
185+ if : always()
186+ run : |
159187 postgrest-loadtest-report-load -g ${{ matrix.kind }} >> "$GITHUB_STEP_SUMMARY"
160188
161189 flake :
Original file line number Diff line number Diff line change @@ -274,12 +274,28 @@ let
274274 import sys
275275 import pandas as pd
276276
277+
278+ def evaluate_change(df):
279+ return ((df['head'] / df['main'] - 1) * 100) \
280+ .map(lambda r: "{icon} {ratio:.1f} %".format(
281+ ratio=r,
282+ # Hardcoded failure threshold for CI is 5% here.
283+ icon="" if r < 5 else ":x:"
284+ ))
285+
286+
277287 pd.read_json(sys.stdin) \
278288 .rename(columns={'latency': sys.argv[1]}) \
279289 .set_index(sys.argv[1]) \
280290 .drop(['branch']) \
281291 .convert_dtypes() \
282- .to_markdown(sys.stdout, floatfmt='.1f')
292+ .assign(change=evaluate_change) \
293+ .to_markdown(
294+ sys.stdout,
295+ floatfmt='.1f',
296+ colglobalalign='right',
297+ colalign=('left',)
298+ )
283299 '' ;
284300
285301
You can’t perform that action at this time.
0 commit comments