Skip to content

[sinatra] Set logging to nil instead of false#703

Merged
MDA2AV merged 2 commits into
MDA2AV:mainfrom
p8:sinatra/nil-logger
May 12, 2026
Merged

[sinatra] Set logging to nil instead of false#703
MDA2AV merged 2 commits into
MDA2AV:mainfrom
p8:sinatra/nil-logger

Conversation

@p8
Copy link
Copy Markdown
Contributor

@p8 p8 commented May 12, 2026

@p8
Copy link
Copy Markdown
Contributor Author

p8 commented May 12, 2026

/benchmark -f sinatra

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: sinatra | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 94,668 4573.1% 6.5GiB -3.6% -3.0%
baseline 4096 64,074 3939.5% 5.0GiB +9.5% +2.0%
pipelined 512 462,752 6406.7% 2.0GiB +7.5% -4.8%
pipelined 4096 451,837 6429.3% 2.1GiB +5.8% ~0%
limited-conn 512 38,186 2910.5% 3.7GiB +2.5% +5.7%
limited-conn 4096 39,746 2999.5% 4.4GiB -0.2% +2.3%
json 4096 204,391 6288.4% 4.8GiB +1.4% +4.3%
json-comp 512 120,645 6481.5% 4.7GiB +2.1% +2.2%
json-comp 4096 124,217 6378.7% 4.5GiB +0.2% +2.3%
json-comp 16384 123,712 6509.9% 4.6GiB +1.8% +2.2%
json-tls 4096 183,969 6453.6% 7.0GiB -0.8% +16.7%
upload 32 961 3042.1% 9.1GiB +1.3% +5.8%
upload 256 915 6347.7% 8.0GiB -0.7% -3.6%
api-4 256 16,737 395.0% 431MiB +4.2% -0.2%
api-16 1024 41,602 1634.7% 1.3GiB +2.6% ~0%
static 1024 23,609 6509.9% 7.1GiB +0.5% +7.6%
static 4096 23,356 6486.2% 7.2GiB +0.3% +2.9%
static 6800 23,253 6522.0% 6.8GiB +0.2% -4.2%
async-db 1024 101,893 6202.0% 2.9GiB +1.4% +3.6%
Full log
[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   162.82ms   48.53ms 520.91ms   76.23%
    Req/Sec   370.33    122.25     2.36k    86.83%
  119434 requests in 5.13s, 2.08GB read
Requests/sec:  23284.72
Transfer/sec:    415.08MB
[info] CPU 6519.9% | Mem 6.9GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   163.14ms   50.23ms 546.84ms   77.35%
    Req/Sec   369.74    138.04     3.48k    89.21%
  119183 requests in 5.10s, 2.07GB read
Requests/sec:  23356.09
Transfer/sec:    416.35MB
[info] CPU 6486.2% | Mem 7.2GiB

=== Best: 23356 req/s (CPU: 6486.2%, Mem: 7.2GiB) ===
[info] saved results/static/4096/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   262.42ms   86.20ms 975.36ms   72.97%
    Req/Sec   356.13    156.49     1.02k    78.23%
  111959 requests in 5.10s, 1.95GB read
Requests/sec:  21931.95
Transfer/sec:    390.96MB
[info] CPU 6454.8% | Mem 6.7GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   252.60ms   87.09ms 845.81ms   71.97%
    Req/Sec   369.51    166.80     2.42k    78.91%
  118744 requests in 5.11s, 2.07GB read
Requests/sec:  23253.96
Transfer/sec:    414.50MB
[info] CPU 6522.0% | Mem 6.8GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   257.05ms   92.59ms 990.44ms   75.20%
    Req/Sec   370.50    165.23     3.59k    79.77%
  119096 requests in 5.15s, 2.07GB read
Requests/sec:  23147.86
Transfer/sec:    412.56MB
[info] CPU 6449.1% | Mem 7.1GiB

=== Best: 23253 req/s (CPU: 6522.0%, Mem: 6.8GiB) ===
[info] saved results/static/6800/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / async-db / 1024c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.43ms   9.11ms   14.00ms   22.40ms   88.10ms

  1018930 requests in 10.00s, 1018932 responses
  Throughput: 101.87K req/s
  Bandwidth:  413.56MB/s
  Status codes: 2xx=1018932, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1018932 / 1018932 responses (100.0%)
  Reconnects: 40284
  Per-template: 202970,204013,204471,204253,203225
  Per-template-ok: 202970,204013,204471,204253,203225
[info] CPU 6202.0% | Mem 2.9GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.32ms   9.13ms   14.30ms   20.80ms   28.90ms

  1015206 requests in 10.00s, 1015207 responses
  Throughput: 101.50K req/s
  Bandwidth:  411.94MB/s
  Status codes: 2xx=1015207, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1015203 / 1015207 responses (100.0%)
  Reconnects: 40350
  Per-template: 202201,203396,203914,203347,202345
  Per-template-ok: 202201,203396,203914,203347,202345
[info] CPU 6309.8% | Mem 2.8GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.59ms   9.31ms   15.00ms   21.90ms   31.30ms

  992629 requests in 10.00s, 992630 responses
  Throughput: 99.24K req/s
  Bandwidth:  403.04MB/s
  Status codes: 2xx=992630, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 992629 / 992630 responses (100.0%)
  Reconnects: 39433
  Per-template: 198012,198550,198865,198698,198504
  Per-template-ok: 198012,198550,198865,198698,198504
[info] CPU 6325.0% | Mem 2.8GiB

=== Best: 101893 req/s (CPU: 6202.0%, Mem: 2.9GiB) ===
[info] input BW: 6.80MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra
[info] skip: sinatra does not subscribe to crud
[info] skip: sinatra does not subscribe to fortunes
[info] skip: sinatra does not subscribe to baseline-h2
[info] skip: sinatra does not subscribe to static-h2
[info] skip: sinatra does not subscribe to baseline-h2c
[info] skip: sinatra does not subscribe to json-h2c
[info] skip: sinatra does not subscribe to baseline-h3
[info] skip: sinatra does not subscribe to static-h3
[info] skip: sinatra does not subscribe to gateway-64
[info] skip: sinatra does not subscribe to gateway-h3
[info] skip: sinatra does not subscribe to production-stack
[info] skip: sinatra does not subscribe to unary-grpc
[info] skip: sinatra does not subscribe to unary-grpc-tls
[info] skip: sinatra does not subscribe to stream-grpc
[info] skip: sinatra does not subscribe to stream-grpc-tls
[info] skip: sinatra does not subscribe to echo-ws
[info] skip: sinatra does not subscribe to echo-ws-pipeline
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-16-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-4-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/async-db-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-tls-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-6800.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-32.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

If the logger is set to false it still initializes a NilLogger.
@p8 p8 force-pushed the sinatra/nil-logger branch from bbc0a6c to 198d59f Compare May 12, 2026 11:39
@p8
Copy link
Copy Markdown
Contributor Author

p8 commented May 12, 2026

/benchmark -f sinatra --save

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: sinatra | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 93,938 4711.6% 6.5GiB -4.4% -3.0%
baseline 4096 65,762 3884.5% 4.9GiB +12.4% ~0%
pipelined 512 466,515 6483.6% 2.0GiB +8.4% -4.8%
pipelined 4096 460,532 6453.3% 2.1GiB +7.8% ~0%
limited-conn 512 37,703 2841.4% 3.8GiB +1.2% +8.6%
limited-conn 4096 40,206 3090.5% 4.2GiB +0.9% -2.3%
json 4096 207,448 6328.1% 4.8GiB +2.9% +4.3%
json-comp 512 119,089 6464.5% 4.7GiB +0.8% +2.2%
json-comp 4096 126,847 6507.3% 4.4GiB +2.4% ~0%
json-comp 16384 125,066 6514.2% 4.6GiB +2.9% +2.2%
json-tls 4096 183,700 6544.4% 6.5GiB -0.9% +8.3%
upload 32 957 3163.6% 8.1GiB +0.8% -5.8%
upload 256 901 6364.3% 8.1GiB -2.2% -2.4%
api-4 256 16,637 394.2% 384MiB +3.6% -11.1%
api-16 1024 41,675 1680.3% 1.4GiB +2.8% +7.7%
static 1024 23,522 6523.5% 6.7GiB +0.2% +1.5%
static 4096 23,519 6505.2% 7.2GiB +1.0% +2.9%
static 6800 23,223 6523.3% 6.8GiB ~0% -4.2%
async-db 1024 102,044 6337.8% 2.8GiB +1.5% ~0%
Full log
[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   162.43ms   45.71ms 523.00ms   74.44%
    Req/Sec   370.45    122.71     2.63k    86.19%
  119547 requests in 5.12s, 2.08GB read
Requests/sec:  23339.61
Transfer/sec:    416.12MB
[info] CPU 6513.3% | Mem 6.9GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   161.09ms   45.10ms 434.88ms   74.43%
    Req/Sec   372.56    140.52     3.42k    87.78%
  120086 requests in 5.11s, 2.09GB read
Requests/sec:  23519.89
Transfer/sec:    419.32MB
[info] CPU 6505.2% | Mem 7.2GiB

=== Best: 23519 req/s (CPU: 6505.2%, Mem: 7.2GiB) ===
[info] saved results/static/4096/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   263.91ms   86.58ms 924.27ms   72.81%
    Req/Sec   354.92    150.90     0.97k    78.48%
  111556 requests in 5.11s, 1.94GB read
Requests/sec:  21850.66
Transfer/sec:    389.73MB
[info] CPU 6451.7% | Mem 6.7GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   255.57ms   93.08ms   1.01s    74.42%
    Req/Sec   369.69    165.67     2.49k    78.21%
  118804 requests in 5.12s, 2.07GB read
Requests/sec:  23223.95
Transfer/sec:    414.26MB
[info] CPU 6523.3% | Mem 6.8GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   254.19ms   83.24ms 865.17ms   71.97%
    Req/Sec   368.52    154.01     1.70k    77.94%
  118370 requests in 5.14s, 2.06GB read
Requests/sec:  23030.29
Transfer/sec:    410.50MB
[info] CPU 6427.2% | Mem 7.2GiB

=== Best: 23223 req/s (CPU: 6523.3%, Mem: 6.8GiB) ===
[info] saved results/static/6800/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / async-db / 1024c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.52ms   9.18ms   14.10ms   23.60ms   86.50ms

  1011274 requests in 10.00s, 1011276 responses
  Throughput: 101.10K req/s
  Bandwidth:  410.43MB/s
  Status codes: 2xx=1011276, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1011276 / 1011276 responses (100.0%)
  Reconnects: 39951
  Per-template: 201742,202321,202740,202689,201784
  Per-template-ok: 201742,202321,202740,202689,201784
[info] CPU 6206.0% | Mem 2.9GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.28ms   9.08ms   14.40ms   20.50ms   28.80ms

  1020446 requests in 10.00s, 1020445 responses
  Throughput: 102.02K req/s
  Bandwidth:  414.03MB/s
  Status codes: 2xx=1020445, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1020443 / 1020445 responses (100.0%)
  Reconnects: 40570
  Per-template: 203607,204439,204565,204209,203623
  Per-template-ok: 203607,204439,204565,204209,203623
[info] CPU 6337.8% | Mem 2.8GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.47ms   9.19ms   14.80ms   20.80ms   29.40ms

  1001227 requests in 10.00s, 1001231 responses
  Throughput: 100.10K req/s
  Bandwidth:  406.37MB/s
  Status codes: 2xx=1001231, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1001230 / 1001231 responses (100.0%)
  Reconnects: 39801
  Per-template: 199591,200369,200857,200725,199688
  Per-template-ok: 199591,200369,200857,200725,199688
[info] CPU 6360.3% | Mem 2.8GiB

=== Best: 102044 req/s (CPU: 6337.8%, Mem: 2.8GiB) ===
[info] input BW: 6.81MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra
[info] skip: sinatra does not subscribe to crud
[info] skip: sinatra does not subscribe to fortunes
[info] skip: sinatra does not subscribe to baseline-h2
[info] skip: sinatra does not subscribe to static-h2
[info] skip: sinatra does not subscribe to baseline-h2c
[info] skip: sinatra does not subscribe to json-h2c
[info] skip: sinatra does not subscribe to baseline-h3
[info] skip: sinatra does not subscribe to static-h3
[info] skip: sinatra does not subscribe to gateway-64
[info] skip: sinatra does not subscribe to gateway-h3
[info] skip: sinatra does not subscribe to production-stack
[info] skip: sinatra does not subscribe to unary-grpc
[info] skip: sinatra does not subscribe to unary-grpc-tls
[info] skip: sinatra does not subscribe to stream-grpc
[info] skip: sinatra does not subscribe to stream-grpc-tls
[info] skip: sinatra does not subscribe to echo-ws
[info] skip: sinatra does not subscribe to echo-ws-pipeline
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-16-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-4-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/async-db-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-tls-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-6800.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-32.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@MDA2AV MDA2AV merged commit 69b3a86 into MDA2AV:main May 12, 2026
@p8 p8 deleted the sinatra/nil-logger branch May 12, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants