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

659 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
Rene Schallner
29b923f96e
Merge pull request #127 from iacore/patch-1
update docs for zap.start
2024-09-02 17:29:11 +00:00
iacore
1155051712
update docs for zap.start 2024-09-02 17:21:15 +00:00
Rene Schallner
e7a6849028
Merge pull request #120 from cosmicboots/endpoint-middleware
Create options for EndpointHandler
2024-07-27 09:22:39 +02:00
Thom Dickson
903716bcf5
update docs and examples for endpoint middleware 2024-07-25 20:38:26 -04:00
Thom Dickson
c5325337e1
Create options for EndpointHandler 2024-07-23 18:39:35 -04:00
Rene Schallner
11fa66a31c doc: getHeader need lowercase keys 2024-07-15 12:29:03 +02:00
Rene Schallner
b77bada381
Merge pull request #117 from cosmicboots/mustache-build
include BuildResult in public Mustache API
2024-07-15 12:09:21 +02:00
Thom Dickson
ee94128c7a
rename MustacheLoadArgs to LoadArgs 2024-07-14 15:57:43 -04:00
Thom Dickson
573b27b9d8
include BuildResult in public Mustache API 2024-07-14 00:09:20 -04:00
Rene Schallner
4868cdcb17 fix hash 2024-06-28 12:41:05 +02:00
GitHub Action
35bb16a37d Update README 2024-06-28 10:22:02 +00:00
Rene Schallner
5de9b42f0d Bump version number in .zon for imminent release 2024-06-28 12:20:46 +02:00
Rene Schallner
0cb3bdcadc update README 2024-06-28 11:56:21 +02:00
Rene Schallner
1c4a10836b remove readme-updates from mastercheck CI build 2024-06-28 11:54:32 +02:00
Rene Schallner
c56ebc7840 corrected release templates 2024-06-28 11:53:22 +02:00
Rene Schallner
4430e829ce update badge in README 2024-06-28 11:42:27 +02:00
Rene Schallner
3409490114 updated zig-master check in CI 2024-06-28 11:41:19 +02:00
Rene Schallner
bef03af8b4 update zig version 2024-06-28 11:35:08 +02:00
Rene Schallner
929a236463
Merge pull request #115 from s0er3n/master
feat: add HEAD Method to `methodToEnum`
2024-06-27 19:37:45 +02:00
Rene Schallner
fed9633121 make zap master build with zig master 2024-06-27 19:33:04 +02:00
Sören Michaels
d330979a75 feat: add HEAD Method to methodAsEnum 2024-06-23 23:59:43 +02:00
Rene Schallner
3f9c7d0f6b
Merge pull request #105 from SlaktarMicke92/feature/remove-deprecated-path
Remove deprecated path
2024-05-26 12:58:05 +02:00
Rene Schallner
094d4cf6f9
Merge pull request #103 from LordAsdi/master
Fix build.zig to allow cross compilation on windows
2024-05-26 12:56:58 +02:00
Michael Wendt
8d1574619c feat: remove deprecated path
LazyPath has been deprecated in Zig 0.12 and in
the Zig master this breaks zig build.
2024-05-22 10:10:55 +02:00
Lord Asdi
b19f84cc43 fix: use std.process.getEnvVarOwned instead of std.posix.getenv
This allows cross compiling zap on a windows host
2024-05-18 22:07:05 +02:00
Rene Schallner
70c0ef1100
Merge pull request #100 from desttinghim/parseAccept
Parse Accept
2024-04-29 03:34:11 +02:00
Louis Pearson
31ba05d6e9 feat: pre-allocate enough space for accept items 2024-04-27 21:09:20 -06:00
Rene Schallner
5712c3b3ac procatively up the version in master for next release 2024-04-27 21:33:50 +02:00
Rene Schallner
5e347ce649 Proactively up the version number in master for next release 2024-04-27 21:32:14 +02:00
Rene Schallner
c79d62ca2c proposed change to parseAccept API 2024-04-27 21:29:32 +02:00
Rene Schallner
fc7f11a35f fix docserver invocation from build.zig 2024-04-27 21:08:27 +02:00
Rene Schallner
209ba1cd98
Merge pull request #101 from GiuseppeCesarano/patch-1
fix: _debug typo in startWithLogging
2024-04-27 19:59:07 +02:00
Giuseppe Cesarano
997627f288
fix: _debug typo in startWithLogging
debug = true should have been _debug = true.
2024-04-27 14:14:09 +02:00
Louis Pearson
4988feb314 fix: simplify accept header api somewhat 2024-04-24 21:53:41 -06:00
Louis Pearson
6d646b62d6 feat: make example for parseAccept 2024-04-24 19:19:11 -06:00
Louis Pearson
698c06d808 feat: add parseAccept 2024-04-24 18:15:04 -06:00
Louis Pearson
583ad97633 fix: move getHeaderCommon to zap.zig 2024-04-24 17:30:30 -06:00
Rene Schallner
d83bf5afa7
Merge pull request #94 from jkoop/more-http-status-enums
update http.zig to rfc9110
2024-04-24 02:37:49 +02:00
Rene Schallner
6d7d1523cc
Merge pull request #99 from leroycep/link-module-to-facil.io
feat: streamline depending on zap by linking facil.io to module
2024-04-24 02:34:44 +02:00
Rene Schallner
0de5c8fbcc
Merge pull request #98 from desttinghim/mimetype
Fix docserver, Wrap http_mimetype_register and http_mimetype_clear
2024-04-24 02:34:28 +02:00
Rene Schallner
9674c8f87a
Update hello_json.zig 2024-04-24 02:11:28 +02:00
geemili
5f65c650bd feat: streamline depending on zap by linking facil.io to module
This means that all downstream users can simply put:

```zig
exe.root_module.addImport("zap", zap.module("zap"))`
```

in their `build.zig` instead of

```zig
exe.root_module.addImport("zap", zap.module("zap"));
exe.linkLibrary(zap.artifact("facil.io"));
```
2024-04-23 17:05:25 -06:00
Louis Pearson
a907ef9fad feat: Wrap mimetypeRegister and mimetypeClear 2024-04-23 16:44:18 -06:00
Louis Pearson
3e4c29409e fix: docserver: server wasm with correct mimetype 2024-04-23 16:13:07 -06:00
Louis Pearson
49d629ba55 fix: last_modifed -> last_modified 2024-04-23 15:15:40 -06:00
Joe Koop
c1e6c160d0
update http.zig to rfc9110
using MDN as a reference
2024-04-22 10:12:36 -05:00
Rene Schallner
6ed2de4634 fix hash in README 2024-04-22 11:16:03 +02:00
Rene Schallner
b8b30012dc Update announceybot.exe with new templates 2024-04-22 08:58:50 +00:00
Rene Schallner
81cdd6107b Update announceybot templates 2024-04-22 10:56:34 +02:00