From 478b56c9afaf8ca8ac793765d8a397f9759f6eea Mon Sep 17 00:00:00 2001 From: Victor Castell Date: Mon, 11 Sep 2023 10:58:47 +0200 Subject: [PATCH] Level-up loadtesting capacity to be aligned with current environment (#1874) * Increase the rate of tx * Increment duration * Change devnet capacity --- .github/workflows/deploy.nightly.devnet.yml | 16 ++++++++++++++-- .github/workflows/loadtest.yml | 4 ++-- .../workflows/manual.deploy.nightly.devnet.yml | 9 ++++++++- loadtest/scenarios/multiple_EOA.js | 2 +- loadtest/scenarios/multiple_ERC20.js | 6 +++--- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.nightly.devnet.yml b/.github/workflows/deploy.nightly.devnet.yml index b7b908a413..e586765e34 100644 --- a/.github/workflows/deploy.nightly.devnet.yml +++ b/.github/workflows/deploy.nightly.devnet.yml @@ -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" @@ -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: | @@ -227,6 +237,7 @@ jobs: runner: devnet environment: ${{ inputs.environment }} scenario: multiple_EOA + duration: ${{ inputs.duration }} loadtest2: needs: loadtest1 @@ -241,6 +252,7 @@ jobs: runner: devnet environment: ${{ inputs.environment }} scenario: multiple_ERC20 + duration: ${{ inputs.duration }} destroy_devnet: needs: [loadtest1, loadtest2] @@ -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 }} \ No newline at end of file + TF_VAR_owner: ${{ secrets.TF_VAR_OWNER }} diff --git a/.github/workflows/loadtest.yml b/.github/workflows/loadtest.yml index cf9200e686..afc9b1496b 100644 --- a/.github/workflows/loadtest.yml +++ b/.github/workflows/loadtest.yml @@ -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 @@ -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 diff --git a/.github/workflows/manual.deploy.nightly.devnet.yml b/.github/workflows/manual.deploy.nightly.devnet.yml index 22dd7d9a71..7071112ce3 100644 --- a/.github/workflows/manual.deploy.nightly.devnet.yml +++ b/.github/workflows/manual.deploy.nightly.devnet.yml @@ -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 @@ -29,3 +35,4 @@ jobs: VAULT_PASSWORD_FILE: ${{ secrets.VAULT_PASSWORD_FILE }} with: environment: devnet + duration: ${{ inputs.duration }} diff --git a/loadtest/scenarios/multiple_EOA.js b/loadtest/scenarios/multiple_EOA.js index 66198c77d5..d3dd860668 100644 --- a/loadtest/scenarios/multiple_EOA.js +++ b/loadtest/scenarios/multiple_EOA.js @@ -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, diff --git a/loadtest/scenarios/multiple_ERC20.js b/loadtest/scenarios/multiple_ERC20.js index e9867b71f9..4323798fd2 100644 --- a/loadtest/scenarios/multiple_ERC20.js +++ b/loadtest/scenarios/multiple_ERC20.js @@ -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, }, }, };