Skip to content

Commit e8fa2f0

Browse files
authored
Merge pull request #612 from p8/sinatra/json-tls
[sinatra] Add json-tls test
2 parents d0a653b + d2c16cb commit e8fa2f0

6 files changed

Lines changed: 108 additions & 5 deletions

File tree

frameworks/sinatra/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ RUN bundle install --jobs=$(nproc)
2020

2121
COPY . .
2222

23-
EXPOSE 8080
23+
EXPOSE 8080 8081
2424

2525
CMD ["bundle", "exec", "puma", "-C", "puma.rb"]

frameworks/sinatra/meta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
"limited-conn",
1313
"json",
1414
"json-comp",
15+
"json-tls",
1516
"upload",
1617
"api-4",
1718
"api-16",
1819
"async-db",
1920
"static"
2021
],
2122
"maintainers": []
22-
}
23+
}

frameworks/sinatra/puma.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
threads ENV.fetch('MAX_THREADS', 4).to_i
22

3-
bind 'tcp://0.0.0.0:8080'
3+
tls_cert_path = ENV.fetch('TLS_CERT', '/certs/server.crt')
4+
tls_key_path = ENV.fetch('TLS_KEY', '/certs/server.key')
5+
bind "tcp://0.0.0.0:8080"
6+
bind "ssl://0.0.0.0:8081?cert=#{tls_cert_path}&key=#{tls_key_path}"
47

58
# Allow all HTTP methods so unknown ones reach Rack middleware (returned as 405)
69
supported_http_methods :any

site/data/current.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"date": "2026-04-23",
2+
"date": "2026-04-25",
33
"cpu": "AMD Ryzen Threadripper PRO 3995WX 64-Cores",
44
"cores": "64",
55
"threads": "128",
@@ -10,7 +10,7 @@
1010
"docker": "29.3.0",
1111
"docker_runtime": "runc",
1212
"governor": "performance",
13-
"commit": "275593ae",
13+
"commit": "0cdffeda",
1414
"tcp": {
1515
"lo_mtu": "1500",
1616
"congestion": "cubic",

site/data/json-tls-4096.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,25 @@
269269
"status_4xx": 0,
270270
"status_5xx": 0
271271
},
272+
{
273+
"framework": "sinatra",
274+
"language": "Ruby",
275+
"rps": 198495,
276+
"avg_latency": "20.63ms",
277+
"p99_latency": "20.63ms",
278+
"cpu": "6499.0%",
279+
"memory": "7.5GiB",
280+
"connections": 4096,
281+
"threads": 64,
282+
"duration": "5s",
283+
"pipeline": 1,
284+
"bandwidth": "683.13MB",
285+
"reconnects": 0,
286+
"status_2xx": 1012490,
287+
"status_3xx": 0,
288+
"status_4xx": 0,
289+
"status_5xx": 0
290+
},
272291
{
273292
"framework": "Swoole",
274293
"language": "PHP",
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
[1] Puma starting in cluster mode...
2+
[1] * Puma version: 7.2.0 ("On The Corner")
3+
[1] * Ruby version: ruby 4.0.3 (2026-04-21 revision 85ddef263a) +YJIT +MN +PRISM [x86_64-linux]
4+
[1] * Min threads: 4
5+
[1] * Max threads: 4
6+
[1] * Environment: production
7+
[1] * Master PID: 1
8+
[1] * Workers: 64
9+
[1] * Restarts: (✔) hot (✖) phased (✖) refork
10+
[1] * Preloading application
11+
[1] * Listening on http://0.0.0.0:8080
12+
[1] * Listening on ssl://0.0.0.0:8081?cert=/certs/server.crt&key=/certs/server.key
13+
[1] Use Ctrl-C to stop
14+
[1] ! WARNING: Detected `RUBY_MN_THREADS=1`
15+
[1] ! This setting is known to cause performance regressions with Puma.
16+
[1] ! Consider disabling this environment variable: https://github.com/puma/puma/issues/3720
17+
[1] - Worker 2 (PID: 14) booted in 0.1s, phase: 0
18+
[1] - Worker 1 (PID: 11) booted in 0.1s, phase: 0
19+
[1] - Worker 0 (PID: 8) booted in 0.1s, phase: 0
20+
[1] - Worker 4 (PID: 21) booted in 0.1s, phase: 0
21+
[1] - Worker 3 (PID: 17) booted in 0.1s, phase: 0
22+
[1] - Worker 5 (PID: 26) booted in 0.1s, phase: 0
23+
[1] - Worker 6 (PID: 29) booted in 0.1s, phase: 0
24+
[1] - Worker 7 (PID: 33) booted in 0.1s, phase: 0
25+
[1] - Worker 8 (PID: 38) booted in 0.1s, phase: 0
26+
[1] - Worker 9 (PID: 42) booted in 0.09s, phase: 0
27+
[1] - Worker 10 (PID: 47) booted in 0.09s, phase: 0
28+
[1] - Worker 11 (PID: 53) booted in 0.09s, phase: 0
29+
[1] - Worker 12 (PID: 57) booted in 0.09s, phase: 0
30+
[1] - Worker 13 (PID: 61) booted in 0.09s, phase: 0
31+
[1] - Worker 14 (PID: 71) booted in 0.09s, phase: 0
32+
[1] - Worker 15 (PID: 77) booted in 0.09s, phase: 0
33+
[1] - Worker 16 (PID: 82) booted in 0.09s, phase: 0
34+
[1] - Worker 17 (PID: 87) booted in 0.09s, phase: 0
35+
[1] - Worker 18 (PID: 92) booted in 0.09s, phase: 0
36+
[1] - Worker 19 (PID: 99) booted in 0.09s, phase: 0
37+
[1] - Worker 20 (PID: 105) booted in 0.1s, phase: 0
38+
[1] - Worker 21 (PID: 111) booted in 0.09s, phase: 0
39+
[1] - Worker 22 (PID: 116) booted in 0.09s, phase: 0
40+
[1] - Worker 23 (PID: 121) booted in 0.09s, phase: 0
41+
[1] - Worker 24 (PID: 127) booted in 0.09s, phase: 0
42+
[1] - Worker 25 (PID: 133) booted in 0.09s, phase: 0
43+
[1] - Worker 26 (PID: 139) booted in 0.09s, phase: 0
44+
[1] - Worker 27 (PID: 144) booted in 0.09s, phase: 0
45+
[1] - Worker 28 (PID: 151) booted in 0.09s, phase: 0
46+
[1] - Worker 29 (PID: 158) booted in 0.08s, phase: 0
47+
[1] - Worker 30 (PID: 168) booted in 0.08s, phase: 0
48+
[1] - Worker 31 (PID: 174) booted in 0.08s, phase: 0
49+
[1] - Worker 32 (PID: 179) booted in 0.08s, phase: 0
50+
[1] - Worker 33 (PID: 185) booted in 0.08s, phase: 0
51+
[1] - Worker 34 (PID: 191) booted in 0.08s, phase: 0
52+
[1] - Worker 35 (PID: 196) booted in 0.08s, phase: 0
53+
[1] - Worker 36 (PID: 202) booted in 0.07s, phase: 0
54+
[1] - Worker 37 (PID: 206) booted in 0.07s, phase: 0
55+
[1] - Worker 38 (PID: 213) booted in 0.07s, phase: 0
56+
[1] - Worker 39 (PID: 218) booted in 0.07s, phase: 0
57+
[1] - Worker 40 (PID: 224) booted in 0.07s, phase: 0
58+
[1] - Worker 41 (PID: 229) booted in 0.07s, phase: 0
59+
[1] - Worker 42 (PID: 234) booted in 0.07s, phase: 0
60+
[1] - Worker 43 (PID: 239) booted in 0.07s, phase: 0
61+
[1] - Worker 44 (PID: 244) booted in 0.06s, phase: 0
62+
[1] - Worker 45 (PID: 252) booted in 0.06s, phase: 0
63+
[1] - Worker 46 (PID: 257) booted in 0.06s, phase: 0
64+
[1] - Worker 47 (PID: 261) booted in 0.06s, phase: 0
65+
[1] - Worker 48 (PID: 267) booted in 0.06s, phase: 0
66+
[1] - Worker 49 (PID: 272) booted in 0.06s, phase: 0
67+
[1] - Worker 50 (PID: 278) booted in 0.06s, phase: 0
68+
[1] - Worker 51 (PID: 285) booted in 0.06s, phase: 0
69+
[1] - Worker 52 (PID: 292) booted in 0.05s, phase: 0
70+
[1] - Worker 53 (PID: 298) booted in 0.05s, phase: 0
71+
[1] - Worker 54 (PID: 304) booted in 0.05s, phase: 0
72+
[1] - Worker 55 (PID: 310) booted in 0.05s, phase: 0
73+
[1] - Worker 56 (PID: 315) booted in 0.05s, phase: 0
74+
[1] - Worker 57 (PID: 321) booted in 0.05s, phase: 0
75+
[1] - Worker 58 (PID: 328) booted in 0.05s, phase: 0
76+
[1] - Worker 59 (PID: 333) booted in 0.05s, phase: 0
77+
[1] - Worker 60 (PID: 340) booted in 0.04s, phase: 0
78+
[1] - Worker 61 (PID: 346) booted in 0.04s, phase: 0
79+
[1] - Worker 62 (PID: 351) booted in 0.04s, phase: 0
80+
[1] - Worker 63 (PID: 357) booted in 0.04s, phase: 0

0 commit comments

Comments
 (0)