Hedra
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
from hedra import (
Setup,
Execute,
action,
Analyze,
JSONConfig,
Submit,
depends,
)
class SetupStage(Setup):
batch_size=1000
total_time='1m'
@depends(SetupStage)
class ExecuteHTTPStage(Execute):
@action()
async def http_get(self):
return await self.client.http.get('https://httpbin.org/get')
@depends(ExecuteHTTPStage)
class AnalyzeStage(Analyze):
pass
@depends(AnalyzeStage)
class SubmitJSONResultsStage(Submit):
config=JSONConfig(
events_filepath='./events.json',
metrics_filepath='./metrics.json'
)
Let's start!