1
+ config :
2
+ target : " http://127.0.0.1:8082"
3
+ payload :
4
+ path : ' mainnet-data.csv'
5
+ fields :
6
+ - ' address'
7
+ - ' block_index'
8
+ - ' block_hash'
9
+ - ' transaction_size'
10
+ - ' relative_ttl'
11
+ - ' transaction_hash'
12
+ http :
13
+ timeout : 240
14
+ defaults :
15
+ headers :
16
+ Content-Type : application/json
17
+
18
+ # Optional test-wide thresholds:
19
+ ensure :
20
+ thresholds :
21
+ - vusers.failed : 1
22
+
23
+ # Example phases to ramp up load
24
+ phases :
25
+ - duration : 60 # 1 minute
26
+ arrivalRate : 1
27
+ name : " Warm-up (1 user/s)"
28
+ - duration : 60 # 1 minute
29
+ arrivalRate : 1
30
+ rampTo : 5
31
+ name : " Ramp to 5 user/s"
32
+ - duration : 60
33
+ arrivalRate : 5
34
+ rampTo : 10
35
+ name : " Ramp to 10 user/s"
36
+ - duration : 60
37
+ arrivalRate : 10
38
+ rampTo : 20
39
+ name : " Ramp to 20 user/s"
40
+ - duration : 60
41
+ arrivalRate : 20
42
+ rampTo : 50
43
+ name : " Ramp to 50 user/s"
44
+ # Example high-load phase (5000 requests/min -> ~83 req/s):
45
+ - duration : 300 # 5 minutes
46
+ arrivalRate : 50
47
+ rampTo : 83
48
+ name : " High Load ~5000 req/min"
49
+
50
+ plugins :
51
+ # keep or remove as needed
52
+ ensure : {}
53
+ expect :
54
+ expectDefault200 : true
55
+ outputFormat : silent
56
+ reportFailuresAsErrors : true
57
+ metrics-by-endpoint :
58
+ useOnlyRequestNames : true
59
+ metricsNamespace : " latency_metrics"
60
+
61
+ # --------------------------------------------------------------------------
62
+ # SCENARIOS
63
+ # --------------------------------------------------------------------------
64
+ scenarios :
65
+ - name : " Network status test"
66
+ flow :
67
+ - post :
68
+ url : " /network/status"
69
+ body : |
70
+ {
71
+ "network_identifier": {
72
+ "blockchain": "cardano",
73
+ "network": "mainnet"
74
+ },
75
+ "metadata": {}
76
+ }
77
+
78
+ - name : " Account balance test"
79
+ flow :
80
+ - post :
81
+ url : " /account/balance"
82
+ body : |
83
+ {
84
+ "network_identifier": {
85
+ "blockchain": "cardano",
86
+ "network": "mainnet"
87
+ },
88
+ "account_identifier": {
89
+ "address": "{{ address }}"
90
+ }
91
+ }
92
+
93
+ - name : " Account coins test"
94
+ flow :
95
+ - post :
96
+ url : " /account/coins"
97
+ body : |
98
+ {
99
+ "network_identifier": {
100
+ "blockchain": "cardano",
101
+ "network": "mainnet"
102
+ },
103
+ "account_identifier": {
104
+ "address": "{{ address }}"
105
+ },
106
+ "include_mempool": true
107
+ }
108
+
109
+ - name : " Block test"
110
+ flow :
111
+ - post :
112
+ url : " /block"
113
+ body : |
114
+ {
115
+ "network_identifier": {
116
+ "blockchain": "cardano",
117
+ "network": "mainnet"
118
+ },
119
+ "block_identifier": {
120
+ "index": {{ block_index }},
121
+ "hash": "{{ block_hash }}"
122
+ }
123
+ }
124
+
125
+ - name : " Block transaction test"
126
+ flow :
127
+ - post :
128
+ url : " /block/transaction"
129
+ body : |
130
+ {
131
+ "network_identifier": {
132
+ "blockchain": "cardano",
133
+ "network": "mainnet"
134
+ },
135
+ "block_identifier": {
136
+ "index": {{ block_index }},
137
+ "hash": "{{ block_hash }}"
138
+ },
139
+ "transaction_identifier": {
140
+ "hash": "{{ transaction_hash }}"
141
+ }
142
+ }
143
+
144
+ - name : " Search transactions test"
145
+ flow :
146
+ - post :
147
+ url : " /search/transactions"
148
+ body : |
149
+ {
150
+ "network_identifier": {
151
+ "blockchain": "cardano",
152
+ "network": "mainnet"
153
+ },
154
+ "transaction_identifier": {
155
+ "hash": "{{ transaction_hash }}"
156
+ }
157
+ }
158
+
159
+ - name : " Construction metadata test"
160
+ flow :
161
+ - post :
162
+ url : " /construction/metadata"
163
+ body : |
164
+ {
165
+ "network_identifier": {
166
+ "blockchain": "cardano",
167
+ "network": "mainnet"
168
+ },
169
+ "options": {
170
+ "transaction_size": {{ transaction_size }},
171
+ "relative_ttl": {{ relative_ttl }}
172
+ }
173
+ }
0 commit comments