Skip to content

typev: use native sha1#735

Open
praisethemoon wants to merge 2 commits into
MDA2AV:mainfrom
praisethemoon:sch/native-sha1
Open

typev: use native sha1#735
praisethemoon wants to merge 2 commits into
MDA2AV:mainfrom
praisethemoon:sch/native-sha1

Conversation

@praisethemoon
Copy link
Copy Markdown
Contributor

Description

Uses C implementation of sha1 instead of vm level implementation.


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.

@praisethemoon
Copy link
Copy Markdown
Contributor Author

/benchmark -f typev

@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: typev | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 1,881,075 6583.3% 212MiB -2.0% +1.4%
baseline 4096 1,857,017 6443.6% 280MiB -3.3% -28.2%
pipelined 512 45,677,062 6522.1% 295MiB -5.9% -0.3%
pipelined 4096 47,789,494 6254.7% 451MiB -0.7% +16.5%
limited-conn 512 879,484 4566.1% 236MiB -0.2% -0.8%
limited-conn 4096 1,260,357 6622.7% 325MiB -3.0% -8.2%
json 4096 1,062,449 6520.6% 482MiB +0.6% +19.3%
upload 32 3,072 1917.8% 195MiB -0.4% +1.6%
upload 256 3,009 3655.6% 272MiB +0.3% +2.3%
echo-ws 512 2,806,886 6599.6% 218MiB -2.2% -19.3%
echo-ws 4096 2,949,622 6640.5% 428MiB -2.7% -5.7%
echo-ws 16384 2,999,470 6330.1% 498MiB +2.8% -0.4%
echo-ws-pipeline 512 19,331,296 6432.2% 196MiB +4.1% +0.5%
echo-ws-pipeline 4096 19,128,784 6138.7% 562MiB ~0% +31.3%
echo-ws-pipeline 16384 19,229,965 6277.8% 437MiB +0.4% -64.4%
Full log
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    159us    109us    119us    132us    466us

  93247200 frames sent in 5.00s, 93246653 frames received
  Throughput: 18.64M req/s
  Bandwidth:  124.46MB/s
  WS upgrades: 215
  WS frames:   93246653
  Latency samples: 93246336 / 93246653 responses (100.0%)
[info] CPU 6510.1% | Mem 271MiB

=== Best: 19331296 req/s (CPU: 6432.2%, Mem: 196MiB) ===
[info] saved results/echo-ws-pipeline/512/typev.json
httparena-bench-typev
httparena-bench-typev

==============================================
=== typev / echo-ws-pipeline / 4096c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    307us    115us    473us    725us   6.50ms

  95285040 frames sent in 5.00s, 95283824 frames received
  Throughput: 19.05M req/s
  Bandwidth:  127.17MB/s
  WS upgrades: 387
  WS frames:   95283824
  Latency samples: 95283648 / 95283824 responses (100.0%)
[info] CPU 6255.9% | Mem 287MiB

[run 2/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    208us    108us    169us    930us   9.79ms

  95592480 frames sent in 5.00s, 95592272 frames received
  Throughput: 19.11M req/s
  Bandwidth:  127.58MB/s
  WS upgrades: 571
  WS frames:   95592272
  Latency samples: 95592080 / 95592272 responses (100.0%)
  Latency overflow (>5s): 80
[info] CPU 6574.8% | Mem 433MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    228us    112us    269us    578us   6.18ms

  95644096 frames sent in 5.00s, 95643924 frames received
  Throughput: 19.12M req/s
  Bandwidth:  127.66MB/s
  WS upgrades: 434
  WS frames:   95643924
  Latency samples: 95643600 / 95643924 responses (100.0%)
[info] CPU 6138.7% | Mem 562MiB

=== Best: 19128784 req/s (CPU: 6138.7%, Mem: 562MiB) ===
[info] saved results/echo-ws-pipeline/4096/typev.json
httparena-bench-typev
httparena-bench-typev

==============================================
=== typev / echo-ws-pipeline / 16384c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    281us    112us    460us    907us   13.50ms

  96155569 frames sent in 5.00s, 96149825 frames received
  Throughput: 19.22M req/s
  Bandwidth:  128.33MB/s
  WS upgrades: 359
  WS frames:   96149825
  Latency samples: 96149825 / 96149825 responses (100.0%)
  Reconnects: 4305
[info] CPU 6277.8% | Mem 437MiB

[run 2/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    339us    114us    468us   3.02ms   19.80ms

  90067984 frames sent in 5.00s, 90048816 frames received
  Throughput: 18.00M req/s
  Bandwidth:  120.22MB/s
  WS upgrades: 1198
  WS frames:   90048816
  Latency samples: 90048816 / 90048816 responses (100.0%)
  Reconnects: 465230
[info] CPU 6257.9% | Mem 999MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    285us    108us    240us   1.21ms   13.80ms

  95874192 frames sent in 5.00s, 95851936 frames received
  Throughput: 19.16M req/s
  Bandwidth:  127.97MB/s
  WS upgrades: 1391
  WS frames:   95851936
  Latency samples: 95851936 / 95851936 responses (100.0%)
  Reconnects: 4264
[info] CPU 6138.2% | Mem 1.1GiB

=== Best: 19229965 req/s (CPU: 6277.8%, Mem: 437MiB) ===
[info] saved results/echo-ws-pipeline/16384/typev.json
httparena-bench-typev
httparena-bench-typev
[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/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/echo-ws-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-pipeline-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-pipeline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-pipeline-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/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/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
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@praisethemoon
Copy link
Copy Markdown
Contributor Author

/benchmark -f typev

@github-actions
Copy link
Copy Markdown
Contributor

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

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