forked from Vesting-Vault/backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathartillery-basic-load-test.yml
More file actions
52 lines (50 loc) · 1.34 KB
/
Copy pathartillery-basic-load-test.yml
File metadata and controls
52 lines (50 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
config:
target: '{{ $processEnvironment.API_BASE_URL || "http://localhost:3000" }}'
phases:
- duration: 60
arrivalRate: 50
name: "Warm up"
- duration: 120
arrivalRate: 200
name: "Ramp up to 200 RPS"
- duration: 300
arrivalRate: 500
name: "Peak load - 500 RPS"
- duration: 120
arrivalRate: 300
name: "Sustained load"
- duration: 60
arrivalRate: 50
name: "Cool down"
scenarios:
- name: "Vault API Load Test"
weight: 80
flow:
- get:
url: "/api/vaults"
headers:
Content-Type: "application/json"
qs:
limit: 50
offset: "{{ $randomInt(0, 10) * 50 }}"
capture:
- json: "$.data[*].id"
as: "vaultIds"
- json: "$.data.length"
as: "vaultCount"
- think: "{{ $randomInt(1, 3) }}"
- loop:
- get:
url: "/api/vaults/{{ vaultIds[$randomInt(0, {{ vaultCount - 1 }})] }}"
headers:
Content-Type: "application/json"
- think: "{{ $randomInt(0, 2) }}"
count: "{{ $randomInt(1, 3) }}"
- name: "Health Check Load Test"
weight: 20
flow:
- get:
url: "/health"
headers:
Content-Type: "application/json"
- think: "{{ $randomInt(0, 1) }}"