Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add gomu gomu no gatling reports #1501

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 51 additions & 2 deletions .github/workflows/gomu-gomu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: Setup gomu gomu
run: |
set -v -x +e
set -v -x
cd ..
git clone https://github.com/keep-starknet-strange/gomu-gomu-no-gatling.git
cd gomu-gomu-no-gatling
Expand All @@ -45,10 +45,59 @@ jobs:

- name: Run gomu gomu test
run: |-
set -v -x +e
set -v -x
./target/production/madara --dev > madara.log 2>&1 &
MADARA_RUN_PID=$!
while ! echo exit | nc localhost 9944; do sleep 1; done
cd ../gomu-gomu-no-gatling
RUST_LOG=info cargo run -- shoot -c config/default.yaml
kill $MADARA_RUN_PID

- name: Process results
run: |
set -v -x
cp ../gomu-gomu-no-gatling/report.json ./
#### 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
| .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("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
#### 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
|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
with:
tool: "customBiggerIsBetter"
output-file-path: ./processed_report.json
alert-threshold: "120%"
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-alert: true
summary-always: true
comment-always: true
comment-on-alert: false
auto-push: ${{ github.ref == 'refs/heads/main' }}
if: always()

- name: Upload madara logs
uses: actions/upload-artifact@v2
with:
name: gomu-gomu-results
path: |
madara.log
report.json
if: always()
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Next release

- ci: add gomu gomu no gatling reports
- feat(runtime): remove custom checks before tx execution
- test: Adding txv3 tests
- feat: L1 gas price/fix
Expand Down
Loading