-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.benchmark.yml
66 lines (57 loc) · 1.68 KB
/
Taskfile.benchmark.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: '3'
includes:
taskvars: ./Taskfile.vars.yml
tasks:
run:
internal: true
cmds:
- task: bench-apollo-gw
- task: bench-apollo-router
- task: bench-graphql-mesh
- task: bench-mercurius
- task: bench-wundergraph-graphql
- task: bench-wundergraph-rpc
bench-cmd:
internal: true
cmds:
- echo 'Running benchmark for {{.NAME}}'
- "hey -z {{.DURATION}} -c {{.CONCURRENCY}} -m POST -H 'content-type: application/json' -D queries/{{.OPERATION}}.json '{{.HOST}}' > results/{{.RESULT_NAME}}.txt"
vars:
RESULT_NAME: "{{.OPERATION}}_c_{{.CONCURRENCY}}_d_{{.DURATION}}_{{.NAME}}"
bench-apollo-gw:
cmds:
- task: bench-cmd
vars:
NAME: apollo-gw
HOST: '{{.EndpointApolloGW}}'
bench-apollo-router:
cmds:
- task: bench-cmd
vars:
NAME: apollo-router
HOST: '{{.EndpointApolloRouter}}'
bench-graphql-mesh:
cmds:
- task: bench-cmd
vars:
NAME: graphql-mesh
HOST: '{{.EndpointGraphqlMesh}}'
bench-mercurius:
cmds:
- task: bench-cmd
vars:
NAME: mercurius
HOST: '{{.EndpointMercurius}}'
bench-wundergraph-graphql:
cmds:
- task: bench-cmd
vars:
NAME: wundergraph-graphql
HOST: '{{.EndpointWundergraphGraphql}}'
bench-wundergraph-rpc:
cmds:
- "hey -z {{.DURATION}} -c {{.CONCURRENCY}} -m GET -H 'content-type: application/json' '{{.HOST}}' > results/{{.RESULT_NAME}}.txt"
vars:
NAME: wundergraph-rpc
HOST: '{{.EndpointWundergraphRpc}}/{{.OPERATION}}'
RESULT_NAME: "{{.OPERATION}}_c_{{.CONCURRENCY}}_d_{{.DURATION}}_{{.NAME}}"