1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00
Commit graph

38 commits

Author SHA1 Message Date
Rene Schallner
49f5cd9342
perf-measures: re-introduce httpz
In the 0.12.0 branch, [httpz](https://github.com/karlseguin/http.zig)
was added to the perf measurements.

Apparently, somehow this got lost, which is a pity. httpz is
super-promising.

Given the perf benchmarks in [this
PR comment](https://github.com/antonputra/tutorials/pull/280#issuecomment-2362637299),
I would have expected httpz to be on par with or better than zap in our
`measure.sh` tests.

However, on my M3 max mac box, I get the following:

**ZAP**:

```
➜  zap git:(reintroduce_httpz_perf) ✗ ./wrk/measure.sh zig-zap
INFO: Listening on port 3000
Listening on 0.0.0.0:3000
INFO: Server is running 4 workers X 4 threads with facil.io 0.7.4 (kqueue)
* Detected capacity: 131056 open file limit
* Root pid: 73099
* Press ^C to stop

INFO: 73110 is running.
INFO: 73111 is running.
INFO: 73112 is running.
INFO: 73113 is running.
========================================================================
                          zig-zap
========================================================================
Running 10s test @ http://127.0.0.1:3000
  4 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.31ms  533.41us  18.77ms   90.57%
    Req/Sec    76.67k     9.04k   86.46k    84.25%
  Latency Distribution
     50%    1.15ms
     75%    1.17ms
     90%    1.75ms
     99%    2.94ms
  3052064 requests in 10.02s, 462.80MB read
  Socket errors: connect 0, read 135, write 0, timeout 0
Requests/sec: 304601.19
Transfer/sec:     46.19MB
```

**httpz**:

```
➜  zap git:(reintroduce_httpz_perf) ✗ ./wrk/measure.sh httpz
========================================================================
                          httpz
========================================================================
Running 10s test @ http://127.0.0.1:3000
  4 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.26ms  528.72us  18.84ms   84.61%
    Req/Sec    44.46k     7.35k   85.50k    88.00%
  Latency Distribution
     50%    2.35ms
     75%    2.39ms
     90%    2.43ms
     99%    3.26ms
  1768925 requests in 10.01s, 91.10MB read
  Socket errors: connect 0, read 230, write 0, timeout 0
Requests/sec: 176712.50
Transfer/sec:      9.10MB
```

Which looks way off. I must admit, I might have done a bad httpz
implementation.

Seeking help from @karlseguin. My motivation: route people away from zap
to alternatives like httpz or even zzz, as those are pure zig, and seem
to be of really good performance. I want a world in which we don't have
to resort to C frameworks to do good, zig-worthy servers 😄 to come
true.
2024-09-20 15:05:13 +02:00
Andreas Stocker
44af23827e fix breaking changes as of 14-4-24 2024-04-14 18:19:18 +02:00
Rene Schallner
d51a0b8ca3 make latest patches work on zig master 2024-02-23 20:34:19 +01:00
renerocksai
3d651229f8 API cleanup #1
--------------

- EndpointListener.register() // was: addEndpoint
- no more Simple
- getEndpoint -> endpoint()
2024-01-08 15:50:46 +01:00
Rene Schallner
82323f835e 0.12.0 ready 2023-12-29 23:34:33 +01:00
Rene Schallner
ac5a902cf6 updated blazingly-fast.md 2023-08-24 11:11:05 +02:00
Rene Schallner
927fcf641b improved benchmark situation in readme 2023-08-23 16:00:05 +02:00
Rene Schallner
dda5e0e209 Incorporate changes from #37
I intentionally kept the bythebook example for reference.
2023-08-23 15:41:30 +02:00
Rene Schallner
c380649763 parameterize measure_all.sh, update main graphs after merge 2023-08-22 22:47:37 +02:00
Rene Schallner
7817064885
Merge pull request #39 from kassane/cpp-threadpool
C++: add threadpool(4)
2023-08-22 22:44:18 +02:00
Matheus Catarino França
3e2d289d92 from single-thread to threadpool(4) 2023-08-22 16:06:55 -03:00
Rene Schallner
18d55cfab4 updated readme, docs with output from new perf tests 2023-08-22 20:18:26 +02:00
Rene Schallner
14f3af7c63 reverted workers back to 4 in zig perf test 2023-08-22 20:09:34 +02:00
Rene Schallner
6562d9ed3e re-wrote blazingly-fast.md 2023-08-22 17:55:35 +02:00
Rene Schallner
7fff5a8c5d reverted hack 2023-08-22 16:45:27 +02:00
Rene Schallner
f10b76f229 renamed bench targets to make langs more clear 2023-08-22 16:45:00 +02:00
Rene Schallner
49b2762ecb renamed wrk test cpp -> cpp-beast 2023-08-22 16:32:43 +02:00
Rene Schallner
ee20bce22d renamed the rust versions in perftests 2023-08-22 15:59:36 +02:00
Rene Schallner
9fe223cdb9 improve measure_all.sh and graph.py 2023-08-22 15:45:00 +02:00
Rene Schallner
61fabea500 added measure_all and graph.py thx @112RG's hyperbench 2023-08-22 15:25:42 +02:00
Rene Schallner
8b82cae541 added @alexpyattaev clean rust bench version 2023-08-22 14:23:49 +02:00
Rene Schallner
02b92d1f5c wrk/measure.sh (@alexpyatttaev): pin processes to cpus 2023-08-22 14:23:49 +02:00
Rene Schallner
2739decb36 zig wrk example: reduce # of workers 2023-08-22 14:23:49 +02:00
Rene Schallner
62574a118c updated flake, renamed rust example to bythebook 2023-08-22 14:23:49 +02:00
Matheus Catarino França
e68435ea9b static 17-byte string 2023-08-21 09:01:16 -03:00
Matheus Catarino França
fb0bfe9631 wrk: cpp-beast sample added 2023-08-19 17:17:16 -03:00
Leonardo Costa
9009638982 Add C# version 2023-06-14 23:13:53 -04:00
Rene Schallner
0c18565cea fixed wrk_zigstd. It compiles but can't handle wrk :( 2023-05-19 15:37:58 +02:00
Desiders
5ff86ffbe6 Remove go binary file 2023-05-04 16:40:34 +03:00
Rene Schallner
d0c59ab008 fixed AuthEndpoint callbacks, BasicAuth logging
AuthEndpoint callbacks now provide pointers to the original
SimpleEndpoint structs, so their fieldParentPtr calls work.
Added extensive debug() logging to BasicAuth with .UserPassword.
2023-05-01 05:55:08 +02:00
Rene Schallner
d7946ec3af added axum and sanic wrk tests thx @felipetrz 2023-04-29 05:47:57 +02:00
Rene Schallner
b9be9eb50f wrl/measure.sh: updated to latest zig 2023-04-18 19:49:38 +02:00
Rene Schallner
894cf27716 fixed wrk code after introducing error 2023-03-10 12:00:21 +01:00
Rene Schallner
c8f9a18dc0 more sane endpoints example 2023-01-18 14:26:01 +01:00
Rene Schallner
12028e53b2 forgot to check in rust code 2023-01-15 06:45:01 +01:00
Rene Schallner
309eaaaeff updated wrk stats with rust results 2023-01-15 06:41:19 +01:00
Rene Schallner
4a9c2037bd fixed wrk stats 2023-01-15 05:47:42 +01:00
Rene Schallner
3db2263383 wrk results 2023-01-15 05:19:19 +01:00