Skip to content

Commit

Permalink
Update README.md, bench.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
pyotrk committed May 25, 2026
1 parent ed5519c commit 3f8aae8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ WASM module exporting functions for collaborative text editing via the RGA CRDT.
| Dependency | Description |
|---|---|
| **Zig 0.16.0 standard library** | `std.Io` for concurrency and I/O, `std.http.Server` for HTTP/WebSocket handling, `std.json` for serialization, `std.hash_map` for data structures. No external packages. |
| **Python 3** (optional) | Uses `http.server` to host static demo files. Any http server can be used. |
| **wrk 4.2.0** (optional) | For HTTP benchmarks. Used in `crdt-server/bench.sh` |

## Installation

Expand Down Expand Up @@ -177,7 +179,7 @@ const val = counter.value();
zig build demo
```

Installs the WASM module and static files to `zig-out/www/`, then serves the demo directory with python `http.server` (python3 required).
Installs the WASM module and static files to `zig-out/www/`, then serves the demo directory with python `http.server`.

## Running Tests

Expand All @@ -186,7 +188,7 @@ Installs the WASM module and static files to `zig-out/www/`, then serves the dem
zig build test --summary all
```

Tests both packages from repo root. No per-package `build.zig` files — run everything at root.
Tests crdt-lib and crdt-server.

Library tests cover all seven CRDT types: empty cases, insert/increment, merge properties (commutative, idempotent, associative), convergence, alternate types, JSON roundtrip, and OOM resilience via `FailingAllocator`.

Expand Down
4 changes: 2 additions & 2 deletions crdt-server/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -euo pipefail
PORT="${1:-8080}"
HOST="http://localhost:$PORT"
JSON='{"counter":[[0,1]]}'
THREADS=16
THREADS=4
DURATION=10s
CONNECTIONS=10000
CONNECTIONS=200

cleanup() {
echo "=== Cleanup ==="
Expand Down

0 comments on commit 3f8aae8

Please sign in to comment.