Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
chore: rework failed check
Browse files Browse the repository at this point in the history
Signed-off-by: Iliya Savov <isavov@users.noreply.github.com>
  • Loading branch information
isavov committed Mar 15, 2024
1 parent 252ce3d commit 0417eb5
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/gomu-gomu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ jobs:
- name: Process results
run: |
set -v -x +e
ls -lah
cp ../gomu-gomu-no-gatling/report.json ./
ls -lah
#### Extract TPS, UOPS, Extrinsics and Steps from the report ####
jq '
.benches[] |= (.name as $benchName | .metrics[] |= (.name = .name + " ("+ $benchName + ")")) # Append benchmark name to each metric name
Expand All @@ -69,28 +67,18 @@ jobs:
|map(select(.name | test("Average TPS|Average UOPS|Average Extrinsics|Average Steps"))) #filter only the metrics we want
' report.json > processed_report.json
- name: Check for failed requests
run: |
set -v -x +e
#### Extract Failed from the report ####
jq '
.benches[] |= (.name as $benchName | .metrics[] |= (.name = .name + " ("+ $benchName + ")")) # Append benchmark name to each metric name
| .benches[].metrics[].extra = .extra # set extra field for each metric
|.benches # extract only benches
|map(.metrics)|add # merge metrics from different benches
|map(select(.name | test("Failed"))) #filter only the metrics we want
' report.json > failed_report.json
- name: Check for failed requests
uses: benchmark-action/github-action-benchmark@v1
with:
tool: "customSmallerIsBetter"
output-file-path: ./failed_report.json
alert-threshold: "120%"
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-alert: true
summary-always: false
comment-always: false
comment-on-alert: true
auto-push: ${{ github.ref == 'refs/heads/main' }}
benchmark-data-dir-path: "dev/bench-failed"
|map(select(.name | test("Failed"))) # filter only the metrics we want
|any(.[]; .value > 0) | if . then halt_error(1) else {} end # fail if there are failed requests
' report.json
- name: Compare result
uses: benchmark-action/github-action-benchmark@v1
Expand Down

0 comments on commit 0417eb5

Please sign in to comment.