Skip to content

Commit

Permalink
Added txpool status after every Load Test
Browse files Browse the repository at this point in the history
  • Loading branch information
bane committed May 13, 2024
1 parent 2d06e79 commit a9ed259
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 53 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ on: # yamllint disable-line rule:truthy
max_gas_utilization:
description: Maximum Gas Utilization
value: ${{ jobs.load_test.outputs.max_gas_utilization }}
txpool_pending:
description: Number of transactions in pending
value: ${{ jobs.txpool_status.outputs.txpool_pending }}
txpool_queued:
description: Number of transactions in queued
value: ${{ jobs.txpool_status.outputs.txpool_queued }}
secrets:
AWS_ROLE_ARN:
required: true
Expand Down Expand Up @@ -239,9 +245,23 @@ jobs:
if: success()
id: load_test_results_success
run: echo "test_output=true" >> $GITHUB_OUTPUT
txpool_status:
name: Check txpool status after Load Test
runs-on: ubuntu-latest
needs: load_test
outputs:
txpool_pending: ${{ steps.txpool_status_results.outputs.txpool_pending }}
txpool_queued: ${{ steps.txpool_status_results.outputs.txpool_queued }}
steps:
- name: Get txpool status
id: txpool_status_results
run: |
txpool_status=$(cast rpc --rpc-url "http://${{ needs.check_network.outputs.rpc_url }}" txpool_status | jq)
echo "txpool_pending=$(echo $txpool_status | jq -r '.pending')" >> $GITHUB_OUTPUT
echo "txpool_queued=$(echo $txpool_status | jq -r '.queued')" >> $GITHUB_OUTPUT
notification:
name: Load Test Notification
needs: load_test
needs: [load_test, txpool_status]
uses: ./.github/workflows/notification-load-test.yml
if: (always() && inputs.notification && needs.load_test.outputs.test_output_success == 'true')
with:
Expand All @@ -263,12 +283,14 @@ jobs:
avg_gas_per_tx: ${{ needs.load_test.outputs.avg_gas_per_tx }}
avg_gas_utilization: ${{ needs.load_test.outputs.avg_gas_utilization }}
max_gas_utilization: ${{ needs.load_test.outputs.max_gas_utilization }}
txpool_pending: ${{ needs.txpool_status.outputs.txpool_pending }}
txpool_queued: ${{ needs.txpool_status.outputs.txpool_queued }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
destroy_load_test_runner:
name: Destroy Load Test Runner
environment: ${{ inputs.environment }}
needs: [load_test_runner, load_test]
needs: [load_test_runner, load_test, txpool_status]
if: always()
runs-on: ubuntu-latest
steps:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,14 @@ jobs:
deploy_network_terraform_output: ${{ needs.deploy_network.outputs.terraform_output }}
deploy_network_ansible_output: ${{ needs.deploy_network.outputs.ansible_output }}
load_test_eoa_output: ${{ needs.load_test_eoa.outputs.load_test_output }}
load_test_eoa_txpool_pending_output: ${{ needs.load_test_eoa.outputs.txpool_pending }}
load_test_eoa_txpool_queued_output: ${{ needs.load_test_eoa.outputs.txpool_queued }}
load_test_erc20_output: ${{ needs.load_test_erc20.outputs.load_test_output }}
load_test_erc20_txpool_pending_output: ${{ needs.load_test_erc20.outputs.txpool_pending }}
load_test_erc20_txpool_queued_output: ${{ needs.load_test_erc20.outputs.txpool_queued }}
load_test_erc721_output: ${{ needs.load_test_erc721.outputs.load_test_output }}
load_test_erc721_txpool_pending_output: ${{ needs.load_test_erc721.outputs.txpool_pending }}
load_test_erc721_txpool_queued_output: ${{ needs.load_test_erc721.outputs.txpool_queued }}
destroy_network_logs_output: ${{ needs.destroy_network.outputs.logs_output }}
destroy_network_terraform_output: ${{ needs.destroy_network.outputs.terraform_output }}
secrets:
Expand Down Expand Up @@ -178,6 +184,8 @@ jobs:
avg_gas_per_tx: ${{ needs.load_test_eoa.outputs.avg_gas_per_tx }}
avg_gas_utilization: ${{ needs.load_test_eoa.outputs.avg_gas_utilization }}
max_gas_utilization: ${{ needs.load_test_eoa.outputs.max_gas_utilization }}
txpool_pending: ${{ needs.load_test_eoa.outputs.txpool_pending }}
txpool_queued: ${{ needs.load_test_eoa.outputs.txpool_queued }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
notification_load_test_erc20:
Expand All @@ -204,6 +212,8 @@ jobs:
avg_gas_per_tx: ${{ needs.load_test_erc20.outputs.avg_gas_per_tx }}
avg_gas_utilization: ${{ needs.load_test_erc20.outputs.avg_gas_utilization }}
max_gas_utilization: ${{ needs.load_test_erc20.outputs.max_gas_utilization }}
txpool_pending: ${{ needs.load_test_erc20.outputs.txpool_pending }}
txpool_queued: ${{ needs.load_test_erc20.outputs.txpool_queued }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
notification_load_test_erc721:
Expand All @@ -230,5 +240,7 @@ jobs:
avg_gas_per_tx: ${{ needs.load_test_erc721.outputs.avg_gas_per_tx }}
avg_gas_utilization: ${{ needs.load_test_erc721.outputs.avg_gas_utilization }}
max_gas_utilization: ${{ needs.load_test_erc721.outputs.max_gas_utilization }}
txpool_pending: ${{ needs.load_test_erc721.outputs.txpool_pending }}
txpool_queued: ${{ needs.load_test_erc721.outputs.txpool_queued }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
17 changes: 4 additions & 13 deletions .github/workflows/notification-deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,10 @@ jobs:
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Triggered by: *${{ github.triggering_actor }}*"
},
{
"type": "mrkdwn",
"text": "Commit: *<https://github.com/${{ github.repository }}/tree/${{ github.sha }}|${{ steps.short_sha.outputs.value }}>*"
}
]
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
},
{
"type": "mrkdwn",
"text": "Environment: *${{ inputs.environment }}*"
Expand All @@ -129,6 +117,9 @@ jobs:
}
]
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/notification-destroy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ jobs:
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Triggered by: *${{ github.triggering_actor }}*"
},
{
"type": "mrkdwn",
"text": "Environment: *${{ inputs.environment }}*"
Expand Down
46 changes: 31 additions & 15 deletions .github/workflows/notification-load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ on: # yamllint disable-line rule:truthy
description: Maximum Gas Utilization
type: string
required: true
txpool_pending:
description: Number of transactions in pending
type: string
required: true
txpool_queued:
description: Number of transactions in queued
type: string
required: true
secrets:
SLACK_WEBHOOK_URL:
required: true
Expand All @@ -94,6 +102,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
succeed_bnt: 'primary'
failed_bnt: 'danger'
with:
payload: |
{
Expand All @@ -114,30 +123,18 @@ jobs:
"type": "plain_text",
"text": "Workflow Run"
},
"style": "${{ env.succeed_bnt }}",
"style": "${{ inputs.txpool_pending == '0' && inputs.txpool_queued == '0' && env.succeed_bnt || env.failed_bnt }}"
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
]
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Triggered by: *${{ github.triggering_actor }}*"
},
{
"type": "mrkdwn",
"text": "Commit: *<https://github.com/${{ github.repository }}/tree/${{ github.sha }}|${{ steps.short_sha.outputs.value }}>*"
}
]
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
},
{
"type": "mrkdwn",
"text": "Environment: *${{ inputs.environment }}*"
Expand All @@ -148,6 +145,9 @@ jobs:
}
]
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
Expand All @@ -171,13 +171,29 @@ jobs:
"type": "mrkdwn",
"text": "Batch Size: *${{ inputs.batch_size }}*"
},
{
"type": "mrkdwn",
"text": "Receipts Timeout: *${{ inputs.receipts_timeout }}*"
}
{
"type": "mrkdwn",
"text": "Wait TX Pool To Empty: *${{ inputs.wait_txpool }}*"
}
]
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Pending TXs: *${{ inputs.txpool_pending }}*"
},
{
"type": "mrkdwn",
"text": "Receipts Timeout: *${{ inputs.receipts_timeout }}*"
"text": "Queued TXs: *${{ inputs.txpool_queued }}*"
}
]
},
Expand Down
53 changes: 34 additions & 19 deletions .github/workflows/notification-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,38 @@ on: # yamllint disable-line rule:truthy
description: Load Test EOA output
type: string
required: true
load_test_eoa_txpool_pending_output:
description: Load Test EOA txpool pending output
type: string
required: true
load_test_eoa_txpool_queued_output:
description: Load Test EOA txpool queued output
type: string
required: true
load_test_erc20_output:
description: Load Test ERC20 output
type: string
required: true
load_test_erc20_txpool_pending_output:
description: Load Test ERC20 txpool pending output
type: string
required: true
load_test_erc20_txpool_queued_output:
description: Load Test ERC20 txpool queued output
type: string
required: true
load_test_erc721_output:
description: Load Test ERC721 output
type: string
required: true
load_test_erc721_txpool_pending_output:
description: Load Test ERC721 txpool pending output
type: string
required: true
load_test_erc721_txpool_queued_output:
description: Load Test ERC721 txpool queued output
type: string
required: true
destroy_network_logs_output:
description: Deploy Network - Logs output
type: string
Expand Down Expand Up @@ -143,7 +167,7 @@ jobs:
"type": "plain_text",
"text": "Workflow Run"
},
"style": "${{ inputs.build_blade_output == '' && inputs.lint_output == '' && inputs.unit_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.property_polybft_test_output == '' && inputs.fuzz_test_output == '' && inputs.benchmark_test_output == '' && inputs.deploy_network_terraform_output == '' && inputs.deploy_network_ansible_output == '' && inputs.load_test_eoa_output == 'true' && inputs.load_test_erc20_output == 'true' && inputs.load_test_erc721_output == 'true' && inputs.destroy_network_logs_output == '' && inputs.destroy_network_terraform_output == '' && env.succeed_bnt || env.failed_bnt }}",
"style": "${{ inputs.build_blade_output == '' && inputs.lint_output == '' && inputs.unit_test_output == '' && inputs.e2e_polybft_test_output == '' && inputs.e2e_legacy_test_output == '' && inputs.property_polybft_test_output == '' && inputs.fuzz_test_output == '' && inputs.benchmark_test_output == '' && inputs.deploy_network_terraform_output == '' && inputs.deploy_network_ansible_output == '' && inputs.load_test_eoa_output == 'true' && inputs.load_test_eoa_txpool_pending_output == '0' && inputs.load_test_eoa_txpool_queued_output == '0' && inputs.load_test_erc20_output == 'true' && inputs.load_test_erc20_txpool_pending_output == '0' && inputs.load_test_erc20_txpool_queued_output == '0' && inputs.load_test_erc721_output == 'true' && inputs.load_test_erc721_txpool_pending_output == '0' && inputs.load_test_erc721_txpool_queued_output == '0' && inputs.destroy_network_logs_output == '' && inputs.destroy_network_terraform_output == '' && env.succeed_bnt || env.failed_bnt }}",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
},
{
Expand All @@ -160,22 +184,10 @@ jobs:
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Triggered by: *${{ github.triggering_actor }}*"
},
{
"type": "mrkdwn",
"text": "Commit: *<https://github.com/${{ github.repository }}/tree/${{ github.sha }}|${{ steps.short_sha.outputs.value }}>*"
}
]
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
},
{
"type": "mrkdwn",
"text": "Environment: *${{ inputs.environment }}*"
Expand All @@ -186,6 +198,9 @@ jobs:
}
]
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
Expand Down Expand Up @@ -232,11 +247,11 @@ jobs:
},
{
"type": "mrkdwn",
"text": "Gossip Message Size: *${{ inputs.gossip_msg_size }}*"
"text": "Log Level: *${{ vars.LOG_LEVEL }}*"
},
{
"type": "mrkdwn",
"text": "Log Level: *${{ vars.LOG_LEVEL }}*"
"text": "Gossip Message Size: *${{ inputs.gossip_msg_size }}*"
}
]
},
Expand Down Expand Up @@ -296,15 +311,15 @@ jobs:
},
{
"type": "mrkdwn",
"text": "${{ inputs.load_test_eoa_output == 'true' && env.succeed_job || env.failed_job }} *Load Test EOA*"
"text": "${{ inputs.load_test_eoa_output == 'true' && inputs.load_test_eoa_txpool_pending_output == '0' && inputs.load_test_eoa_txpool_queued_output == '0' && env.succeed_job || env.failed_job }} *Load Test EOA*"
},
{
"type": "mrkdwn",
"text": "${{ inputs.load_test_erc20_output == 'true' && env.succeed_job || env.failed_job }} *Load Test ERC20*"
"text": "${{ inputs.load_test_erc20_output == 'true' && inputs.load_test_erc20_txpool_pending_output == '0' && inputs.load_test_erc20_txpool_queued_output == '0' && env.succeed_job || env.failed_job }} *Load Test ERC20*"
},
{
"type": "mrkdwn",
"text": "${{ inputs.load_test_erc721_output == 'true' && env.succeed_job || env.failed_job }} *Load Test ERC721*"
"text": "${{ inputs.load_test_erc721_output == 'true' && inputs.load_test_erc721_txpool_pending_output == '0' && inputs.load_test_erc721_txpool_queued_output == '0' && env.succeed_job || env.failed_job }} *Load Test ERC721*"
}
]
}
Expand Down

0 comments on commit a9ed259

Please sign in to comment.