Skip to content

Add django framework - #1114

Open
nigrosimone wants to merge 2 commits into
MDA2AV:mainfrom
nigrosimone:add-django
Open

Add django framework#1114
nigrosimone wants to merge 2 commits into
MDA2AV:mainfrom
nigrosimone:add-django

Conversation

@nigrosimone

@nigrosimone nigrosimone commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

Adds Django 6.1 as an ASGI application on Uvicorn, standard mode.

  • meta.json: Python / flagship / standard, subscribed to baseline, pipelined, limited-conn, json, json-comp and upload
  • app.py: URLconf routing with the int path converter, async views, JsonResponse for the payload, GZipMiddleware for json-comp
  • ASGI and not WSGI because the WSGI request drops Transfer-Encoding: chunked bodies, which baseline sends

./scripts/validate.sh django passes locally, 23 checks.

Disclaimer

I am neither the maintainer nor affiliated in any way with this framework. I did my best to implement it correctly, using Opus 5 as a guide.

@nigrosimone

nigrosimone commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

benchmark -f django --save

@github-actions

Copy link
Copy Markdown
Contributor

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

@nigrosimone
nigrosimone marked this pull request as ready for review August 14, 2026 05:23
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ /benchmark --save cannot start: main has diverged and cannot be auto-merged into this branch. Please merge or rebase main manually, push, and re-run /benchmark --save.

@nigrosimone

nigrosimone commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

benchmark -f django --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: django | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 30,555 5873.5% 2.4GiB ~0% ~0%
baseline 4096 29,568 5881.2% 3.1GiB ~0% ~0%
pipelined 512 70,655 6351.2% 2.4GiB ~0% ~0%
pipelined 4096 57,033 5980.0% 3.1GiB ~0% ~0%
limited-conn 512 29,850 5942.6% 2.5GiB ~0% ~0%
limited-conn 4096 29,657 5900.5% 3.1GiB ~0% ~0%
json 4096 27,191 5833.8% 3.1GiB ~0% ~0%
json-comp 512 25,069 6031.4% 2.7GiB ~0% ~0%
json-comp 4096 24,540 5953.6% 4.7GiB ~0% ~0%
json-comp 16384 22,094 5707.4% 9.4GiB ~0% ~0%
upload 32 656 2050.0% 2.4GiB ~0% ~0%
upload 256 656 6230.4% 2.9GiB ~0% ~0%
Full log
==============================================
[info] waiting for server...
[info] server ready

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   48.59ms   31.60ms   124.20ms   215.50ms   287.30ms

  3280 requests in 5.00s, 3280 responses
  Throughput: 655 req/s
  Bandwidth:  92.39KB/s
  Status codes: 2xx=3280, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 3280 / 3280 responses (100.0%)
  Reconnects: 650
  Per-template: 790,791,880,819
  Per-template-ok: 790,791,880,819
[info] CPU 2050.0% | Mem 2.4GiB

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   49.84ms   32.20ms   130.50ms   220.70ms   311.00ms

  3198 requests in 5.00s, 3198 responses
  Throughput: 639 req/s
  Bandwidth:  90.08KB/s
  Status codes: 2xx=3198, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 3198 / 3198 responses (100.0%)
  Reconnects: 629
  Per-template: 775,772,841,810
  Per-template-ok: 775,772,841,810
[info] CPU 1947.7% | Mem 2.4GiB

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   50.44ms   32.10ms   132.90ms   226.10ms   403.30ms

  3159 requests in 5.00s, 3159 responses
  Throughput: 631 req/s
  Bandwidth:  88.99KB/s
  Status codes: 2xx=3159, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 3159 / 3159 responses (100.0%)
  Reconnects: 624
  Per-template: 755,761,833,810
  Per-template-ok: 755,761,833,810
[info] CPU 1925.7% | Mem 2.5GiB

=== Best: 656 req/s (CPU: 2050.0%, Mem: 2.4GiB) ===
[info] input BW: 5.20GB/s (avg template: 8516680 bytes)
[info] saved results/upload/32/django.json
httparena-bench-django
httparena-bench-django

==============================================
=== django / upload / 256c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   361.91ms   302.30ms   875.60ms    1.35s    1.69s

  3282 requests in 5.00s, 3282 responses
  Throughput: 656 req/s
  Bandwidth:  92.52KB/s
  Status codes: 2xx=3282, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 3282 / 3282 responses (100.0%)
  Reconnects: 571
  Per-template: 562,883,1045,792
  Per-template-ok: 562,883,1045,792
[info] CPU 6230.4% | Mem 2.9GiB

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   376.21ms   329.30ms   898.10ms    1.38s    1.73s

  3165 requests in 5.00s, 3166 responses
  Throughput: 632 req/s
  Bandwidth:  89.25KB/s
  Status codes: 2xx=3166, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 3166 / 3166 responses (100.0%)
  Reconnects: 546
  Per-template: 521,847,1028,770
  Per-template-ok: 521,847,1028,770
[info] CPU 6325.3% | Mem 3.1GiB

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   374.44ms   319.90ms   885.10ms    1.40s    1.89s

  3168 requests in 5.00s, 3168 responses
  Throughput: 633 req/s
  Bandwidth:  89.30KB/s
  Status codes: 2xx=3168, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 3168 / 3168 responses (100.0%)
  Reconnects: 552
  Per-template: 527,864,1025,752
  Per-template-ok: 527,864,1025,752
[info] CPU 6131.7% | Mem 2.9GiB

=== Best: 656 req/s (CPU: 6230.4%, Mem: 2.9GiB) ===
[info] input BW: 5.20GB/s (avg template: 8516680 bytes)
[info] saved results/upload/256/django.json
httparena-bench-django
httparena-bench-django
[info] skip: django does not subscribe to api-4
[info] skip: django does not subscribe to api-16
[info] skip: django does not subscribe to static
[info] skip: django does not subscribe to static-tls
[info] skip: django does not subscribe to async-db
[info] skip: django does not subscribe to crud
[info] skip: django does not subscribe to fortunes
[info] skip: django does not subscribe to baseline-h2
[info] skip: django does not subscribe to static-h2
[info] skip: django does not subscribe to baseline-h2c
[info] skip: django does not subscribe to json-h2c
[info] skip: django does not subscribe to baseline-h3
[info] skip: django does not subscribe to static-h3
[info] skip: django does not subscribe to gateway-64
[info] skip: django does not subscribe to gateway-h3
[info] skip: django does not subscribe to production-stack
[info] skip: django does not subscribe to unary-grpc
[info] skip: django does not subscribe to unary-grpc-tls
[info] skip: django does not subscribe to stream-grpc
[info] skip: django does not subscribe to stream-grpc-tls
[info] skip: django does not subscribe to echo-ws
[info] skip: django does not subscribe to echo-ws-pipeline
[info] skip: django does not subscribe to echo-ws-limited
[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/results/django.json - 12 new, 12 total
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
[info] restoring loopback MTU to 65536

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.

1 participant