Skip to content

[C#] GenHTTP: Pre-compress static files#631

Merged
MDA2AV merged 3 commits intoMDA2AV:mainfrom
Kaliumhexacyanoferrat:genhttp-precompress-static
Apr 25, 2026
Merged

[C#] GenHTTP: Pre-compress static files#631
MDA2AV merged 3 commits intoMDA2AV:mainfrom
Kaliumhexacyanoferrat:genhttp-precompress-static

Conversation

@Kaliumhexacyanoferrat
Copy link
Copy Markdown
Collaborator

Description


PR Commands — comment on this PR to trigger (requires collaborator approval):

Command Description
/benchmark -f <framework> Run all benchmark tests
/benchmark -f <framework> -t <test> Run a specific test
/benchmark -f <framework> --save Run and save results (updates leaderboard on merge)

Always specify -f <framework>. Results are automatically compared against the current leaderboard.


Run benchmarks locally

You can validate and benchmark your framework locally with the lite script — no CPU pinning, fixed connection counts, all load generators run in Docker.

./scripts/validate.sh <framework>
./scripts/benchmark-lite.sh <framework> baseline
./scripts/benchmark-lite.sh --load-threads 4 <framework>

Requirements: Docker Engine on Linux. Load generators (gcannon, h2load, h2load-h3, wrk, ghz) are built as self-contained Docker images on first run.

@Kaliumhexacyanoferrat Kaliumhexacyanoferrat self-assigned this Apr 24, 2026
@Kaliumhexacyanoferrat
Copy link
Copy Markdown
Collaborator Author

/benchmark -f genhttp -t static --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 run triggered for genhttp (test: static) with --save. Results will be posted here when done.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: genhttp | Test: static

Test Conn RPS CPU Mem Δ RPS Δ Mem
static 1024 159,730 6193.5% 608MiB -11.2% -3.8%
static 4096 174,313 6284.4% 1.4GiB -0.5% -36.4%
static 6800 169,210 6327.4% 1.8GiB +2.7% -52.6%
Full log
#5 DONE 0.0s

#6 [build 1/6] FROM mcr.microsoft.com/dotnet/sdk:10.0@sha256:8a90a473da5205a16979de99d2fc20975e922c68304f5c79d564e666dc3982fc
#6 resolve mcr.microsoft.com/dotnet/sdk:10.0@sha256:8a90a473da5205a16979de99d2fc20975e922c68304f5c79d564e666dc3982fc 0.1s done
#6 DONE 0.1s

#7 [stage-1 1/3] FROM mcr.microsoft.com/dotnet/runtime:10.0@sha256:8fb7ff015fcf0ebc6e90105bd6db06875954e6dc3d374b9dbb34c732867d13e4
#7 resolve mcr.microsoft.com/dotnet/runtime:10.0@sha256:8fb7ff015fcf0ebc6e90105bd6db06875954e6dc3d374b9dbb34c732867d13e4 0.1s done
#7 DONE 0.1s

#5 [internal] load build context
#5 transferring context: 3.71kB done
#5 DONE 0.0s

#8 [build 3/6] COPY genhttp.csproj ./
#8 CACHED

#9 [build 5/6] COPY . .
#9 CACHED

#10 [build 2/6] WORKDIR /source
#10 CACHED

#11 [build 4/6] RUN dotnet restore
#11 CACHED

#12 [build 6/6] RUN dotnet publish -c Release --no-self-contained -o /app
#12 CACHED

#13 [stage-1 2/3] WORKDIR /app
#13 CACHED

#14 [stage-1 3/3] COPY --from=build /app .
#14 CACHED

#15 exporting to image
#15 exporting layers done
#15 exporting manifest sha256:19e8fcd611a394b48cf652894b028ad216fcf75189ec881a619d42c62c0a8043 done
#15 exporting config sha256:e9efa6e8a81fbb7bf1e2e641b15d2e8a841f14612967a5f0bf78bed30f909518 done
#15 exporting attestation manifest sha256:ea16ea5be5bb23637cfcf7f1f5dd8bfad81118d0aa6984e152274cf570137dc6
#15 exporting attestation manifest sha256:ea16ea5be5bb23637cfcf7f1f5dd8bfad81118d0aa6984e152274cf570137dc6 0.1s done
#15 exporting manifest list sha256:ae3d1e51ce5d4cacc9b8ed5e57156a87bec806bdcde7f8110239b084a40cdaf4
#15 exporting manifest list sha256:ae3d1e51ce5d4cacc9b8ed5e57156a87bec806bdcde7f8110239b084a40cdaf4 0.1s done
#15 naming to docker.io/library/httparena-genhttp:latest done
#15 unpacking to docker.io/library/httparena-genhttp:latest done
#15 DONE 0.3s
[info] tuning host for benchmark runs
[info] CPU governor → performance
[info] setting kernel socket limits
[info] setting UDP buffer sizes for QUIC
[info] setting loopback MTU to 1500 (realistic Ethernet)
[info] restarting docker daemon
[info] dropping kernel caches
[info] starting postgres sidecar
[info] postgres ready (seeded)
[info] starting redis sidecar (cpuset=0,64)
[info] redis ready

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

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    10.81ms   11.87ms 130.55ms   84.30%
    Req/Sec     2.07k   308.45     4.96k    88.20%
  667914 requests in 5.10s, 39.50GB read
Requests/sec: 130983.25
Transfer/sec:      7.75GB
[info] CPU 6175.0% | Mem 497MiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     9.82ms   10.81ms  50.65ms   82.98%
    Req/Sec     2.47k   186.38     6.38k    94.48%
  802321 requests in 5.10s, 47.51GB read
Requests/sec: 157349.13
Transfer/sec:      9.32GB
[info] CPU 6358.4% | Mem 606MiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     8.76ms    9.15ms  44.25ms   83.59%
    Req/Sec     2.51k   178.07     5.72k    97.61%
  814633 requests in 5.10s, 48.23GB read
Requests/sec: 159730.08
Transfer/sec:      9.46GB
[info] CPU 6193.5% | Mem 608MiB

=== Best: 159730 req/s (CPU: 6193.5%, Mem: 608MiB) ===
[info] saved results/static/1024/genhttp.json
httparena-bench-genhttp
httparena-bench-genhttp

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

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    30.56ms   26.89ms 264.35ms   66.27%
    Req/Sec     2.25k   631.07     4.90k    86.87%
  679569 requests in 5.10s, 39.88GB read
Requests/sec: 133263.98
Transfer/sec:      7.82GB
[info] CPU 6124.2% | Mem 862MiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    27.98ms   24.62ms 131.49ms   60.65%
    Req/Sec     2.63k   386.28    10.42k    93.43%
  852359 requests in 5.10s, 50.13GB read
Requests/sec: 167135.77
Transfer/sec:      9.83GB
[info] CPU 6263.1% | Mem 1.3GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    27.01ms   24.00ms 128.71ms   63.37%
    Req/Sec     2.74k   412.02    11.37k    97.64%
  889046 requests in 5.10s, 52.29GB read
Requests/sec: 174313.14
Transfer/sec:     10.25GB
[info] CPU 6284.4% | Mem 1.4GiB

=== Best: 174313 req/s (CPU: 6284.4%, Mem: 1.4GiB) ===
[info] saved results/static/4096/genhttp.json
httparena-bench-genhttp
httparena-bench-genhttp

==============================================
=== genhttp / 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    46.24ms   34.77ms 314.39ms   71.09%
    Req/Sec     2.16k     0.87k    6.72k    84.84%
  655350 requests in 5.10s, 38.45GB read
Requests/sec: 128520.26
Transfer/sec:      7.54GB
[info] CPU 5911.3% | Mem 1.3GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    40.68ms   32.56ms 300.11ms   68.28%
    Req/Sec     2.67k   626.55    14.67k    83.07%
  863018 requests in 5.10s, 50.60GB read
Requests/sec: 169210.89
Transfer/sec:      9.92GB
[info] CPU 6327.4% | Mem 1.8GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    41.48ms   30.09ms 258.17ms   62.67%
    Req/Sec     2.64k   435.30    11.44k    92.51%
  853792 requests in 5.10s, 50.12GB read
Requests/sec: 167395.39
Transfer/sec:      9.83GB
[info] CPU 6330.9% | Mem 2.2GiB

=== Best: 169210 req/s (CPU: 6327.4%, Mem: 1.8GiB) ===
[info] saved results/static/6800/genhttp.json
httparena-bench-genhttp
httparena-bench-genhttp
[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/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/current.json
[info] done
httparena-postgres
httparena-redis
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@Kaliumhexacyanoferrat Kaliumhexacyanoferrat marked this pull request as ready for review April 24, 2026 21:57
@MDA2AV MDA2AV merged commit abb3cfd into MDA2AV:main Apr 25, 2026
2 checks passed
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