Skip to content
40 changes: 39 additions & 1 deletion packages/artillery/configs/execute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,46 @@ config:
processor: '../src/processors/multi-endpoints.ts'

scenarios:
- name: 'Execute JS Stress Test'
- name: 'Execute JS Stress Test - Sign'
weight: 100
variables:
# Access in the script via context.scenario.variables.variant
variant: 'sign'
flow:
- function: 'runExecuteJSTest'
- think: 0.1
- name: 'Execute JS Stress Test - Broadcast and Collect'
weight: 0
variables:
variant: 'broadcastAndCollect'
flow:
- function: 'runExecuteJSTest'
- think: 0.1
- name: 'Execute JS Stress Test - Check Conditions with Auth Sig'
weight: 0
variables:
variant: 'checkConditionsWithoutAuthSig'
flow:
- function: 'runExecuteJSTest'
- think: 0.1
- name: 'Execute JS Stress Test - Sign Child Lit Action'
weight: 0
variables:
variant: 'signChildLitAction'
flow:
- function: 'runExecuteJSTest'
- think: 0.1
- name: 'Execute JS Stress Test - Decrypt to Single Node without Auth Sig'
weight: 0
variables:
variant: 'decryptToSingleNode'
flow:
- function: 'runExecuteJSTest'
- think: 0.1
- name: 'Execute JS Stress Test - Run Once'
weight: 0
variables:
variant: 'runOnce'
flow:
- function: 'runExecuteJSTest'
- think: 0.1
8 changes: 3 additions & 5 deletions packages/artillery/configs/sign-session-key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ config:
# Over 60s, ramp up to creating 50 vusers per second
- duration: 60
arrivalRate: 5
# rampTo: 50
rampTo: 10
rampTo: 150
name: 'Ramp Up'
# Over 300s, create 50 vusers per second
- duration: 300
# arrivalRate: 50
arrivalRate: 10
arrivalRate: 150
name: 'Sustained Sign Session Key'
# Over 60s, ramp down to creating 5 vusers per second
- duration: 60
arrivalRate: 5
arrivalRate: 20
name: 'Ramp Down'
processor: '../src/processors/multi-endpoints.ts'

Expand Down
10 changes: 5 additions & 5 deletions packages/artillery/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,35 @@
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/pkp-sign.yml; else artillery run configs/pkp-sign.yml; fi'"
"command": "artillery run configs/pkp-sign.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")"
}
},
"run:encrypt-decrypt": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/encrypt-decrypt.yml; else artillery run configs/encrypt-decrypt.yml; fi'"
"command": "artillery run configs/encrypt-decrypt.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")"
}
},
"run:execute": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/execute.yml; else artillery run configs/execute.yml; fi'"
"command": "artillery run configs/execute.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")"
}
},
"run:mix": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/mix.yml; else artillery run configs/mix.yml; fi'"
"command": "artillery run configs/mix.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")"
}
},
"run:sign-session-key": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"command": "dotenvx run --env-file=../../.env -- bash -lc 'if [ -n \"$ARTILLERY_KEY\" ]; then artillery run --record --key \"$ARTILLERY_KEY\" configs/sign-session-key.yml; else artillery run configs/sign-session-key.yml; fi'"
"command": "artillery run configs/sign-session-key.yml $([ -n \"$ARTILLERY_KEY\" ] && echo \"--record --key $ARTILLERY_KEY\")"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/artillery/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const _network = process.env['NETWORK'];

// CONFIGURATIONS
const REJECT_BALANCE_THRESHOLD = 0;
const LEDGER_MINIMUM_BALANCE = 20000;
const LEDGER_MINIMUM_BALANCE = 10000;

(async () => {
// -- Start
Expand Down
Loading
Loading