-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
93 lines (71 loc) · 2.86 KB
/
Makefile
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
up-basic:
docker compose up -d
up-kong:
cd gateways/kong && docker compose up -d
up-tyk:
cd gateways/tyk && docker compose up -d
up-apisix:
cd gateways/apisix && docker compose up -d
# start all
start: up-basic up-kong up-tyk up-apisix
down-basic:
docker compose down
down-kong:
cd gateways/kong && docker compose down
down-apisix:
cd gateways/apisix && docker compose down
down-tyk:
cd gateways/tyk && docker compose down
# stop all
stop: down-basic down-kong down-apisix down-tyk
t=1
c=200
d=30s
WRK_OPTIONS := -t$(t) -c$(c) -d$(d) --latency
bench-upstream:
wrk $(WRK_OPTIONS) http://localhost:8888
bench-single-static:
curl http://localhost:8000/api
curl http://localhost:9080/api
curl http://localhost:8080/api
wrk $(WRK_OPTIONS) http://localhost:8000/api
sleep 10
wrk $(WRK_OPTIONS) http://localhost:9080/api
sleep 10
wrk $(WRK_OPTIONS) http://localhost:8080/api
bench-static:
curl http://localhost:8000/paths/urls/links/redirects
curl http://localhost:9080/paths/urls/links/redirects
curl http://localhost:8080/paths/urls/links/redirects
wrk $(WRK_OPTIONS) http://localhost:8000/paths/urls/links/redirects
sleep 10
wrk $(WRK_OPTIONS) http://localhost:9080/paths/urls/links/redirects
sleep 10
wrk $(WRK_OPTIONS) http://localhost:8080/paths/urls/links/redirects
bench-openai:
curl http://localhost:8000/threads/{thread_id}/messages/{message_id}/files/{file_id}
curl http://localhost:9080/threads/{thread_id}/messages/{message_id}/files/{file_id}
curl http://localhost:8080/threads/{thread_id}/messages/{message_id}/files/{file_id}
wrk $(WRK_OPTIONS) --script scripts/wrk/openai-path.lua http://localhost:8000
sleep 10
wrk $(WRK_OPTIONS) --script scripts/wrk/openai-path.lua http://localhost:9080
sleep 10
wrk $(WRK_OPTIONS) --script scripts/wrk/openai-path.lua http://localhost:8080
bench-okta:
curl http://localhost:8000/api/v1/brands/{brandId}/templates/email/{templateName}/customizations/{customizationId}/preview
curl http://localhost:9080/api/v1/brands/{brandId}/templates/email/{templateName}/customizations/{customizationId}/preview
curl http://localhost:8080/api/v1/brands/{brandId}/templates/email/{templateName}/customizations/{customizationId}/preview
wrk $(WRK_OPTIONS) --script scripts/wrk/okta-path.lua http://localhost:8000
sleep 10
wrk $(WRK_OPTIONS) --script scripts/wrk/okta-path.lua http://localhost:9080
sleep 10
wrk $(WRK_OPTIONS) --script scripts/wrk/okta-path.lua http://localhost:8080
bench-github:
curl http://localhost:8000/repos/{owner}/{repo}/pages/health
curl http://localhost:9080/repos/{owner}/{repo}/pages/health
curl http://localhost:8080/repos/{owner}/{repo}/pages/health
wrk $(WRK_OPTIONS) --script scripts/wrk/github-path.lua http://localhost:8000
sleep 10
wrk $(WRK_OPTIONS) --script scripts/wrk/github-path.lua http://localhost:9080
sleep 10
wrk $(WRK_OPTIONS) --script scripts/wrk/github-path.lua http://localhost:8080