Skip to content

Commit

Permalink
Level-up loadtesting capacity to be aligned with current environment (0…
Browse files Browse the repository at this point in the history
…xPolygon#1874)

* Increase the rate of tx
* Increment duration
* Change devnet capacity
  • Loading branch information
vcastellm authored Sep 11, 2023
1 parent 01e657e commit 478b56c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 9 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/deploy.nightly.devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,22 @@ on: # yamllint disable-line rule:truthy
description: The environment to run against
required: false
type: environment
duration:
default: '10m'
description: Duration of the test
required: false
type: string
workflow_call:
inputs:
environment:
description: The environment to run against
type: string
required: true
duration:
default: '10m'
description: Duration of the test
required: false
type: string
outputs:
workflow_output_loadtest1:
description: "Loadtest output"
Expand Down Expand Up @@ -204,7 +214,7 @@ jobs:
run: |
ansible-inventory --graph
ansible-galaxy install -r requirements.yml
ansible-playbook site.yml
ansible-playbook site.yml --extra-vars "block_gas_limit=200000000 block_time=2"
- name: Set rpc url value
id: url
run: |
Expand All @@ -227,6 +237,7 @@ jobs:
runner: devnet
environment: ${{ inputs.environment }}
scenario: multiple_EOA
duration: ${{ inputs.duration }}

loadtest2:
needs: loadtest1
Expand All @@ -241,6 +252,7 @@ jobs:
runner: devnet
environment: ${{ inputs.environment }}
scenario: multiple_ERC20
duration: ${{ inputs.duration }}

destroy_devnet:
needs: [loadtest1, loadtest2]
Expand Down Expand Up @@ -276,4 +288,4 @@ jobs:
run: terraform destroy -auto-approve -state=state.json
env:
TF_VAR_deployment_name: ${{ secrets.TF_VAR_DEPLOYMENT_NAME }}
TF_VAR_owner: ${{ secrets.TF_VAR_OWNER }}
TF_VAR_owner: ${{ secrets.TF_VAR_OWNER }}
4 changes: 2 additions & 2 deletions .github/workflows/loadtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on: # yamllint disable-line rule:truthy
description: The scenario to run
type: string
duration:
default: '2m'
default: '5m'
description: Duration of the test
required: false
type: string
Expand All @@ -39,7 +39,7 @@ on: # yamllint disable-line rule:truthy
description: The mode for the stress test
type: string
duration:
default: '2m'
default: '5m'
description: Duration of the test
required: false
type: string
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/manual.deploy.nightly.devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ on: # yamllint disable-line rule:truthy
branches:
- jesse/fix-*
workflow_call: {}
workflow_dispatch: {}
workflow_dispatch:
inputs:
duration:
default: '10m'
description: Duration of the test
required: false
type: string

permissions:
id-token: write
Expand All @@ -29,3 +35,4 @@ jobs:
VAULT_PASSWORD_FILE: ${{ secrets.VAULT_PASSWORD_FILE }}
with:
environment: devnet
duration: ${{ inputs.duration }}
2 changes: 1 addition & 1 deletion loadtest/scenarios/multiple_EOA.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const options = {
scenarios: {
constant_request_rate: {
executor: 'constant-arrival-rate',
rate: 300,
rate: 1000,
timeUnit: '1s',
duration: duration,
preAllocatedVUs: 20,
Expand Down
6 changes: 3 additions & 3 deletions loadtest/scenarios/multiple_ERC20.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export const options = {
scenarios: {
constant_request_rate: {
executor: 'constant-arrival-rate',
rate: 200,
rate: 1000,
timeUnit: '1s',
duration: duration,
preAllocatedVUs: 10,
maxVUs: 10,
preAllocatedVUs: 20,
maxVUs: 20,
},
},
};
Expand Down

0 comments on commit 478b56c

Please sign in to comment.