From 3f8aae8f98c8ef551270ea602b0c3a2c09e64032 Mon Sep 17 00:00:00 2001 From: Pyotr Karbovskiy-Kjellman Date: Mon, 25 May 2026 15:20:56 +0200 Subject: [PATCH] Update README.md, bench.sh --- README.md | 6 ++++-- crdt-server/bench.sh | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 110d0a5..6efe8ef 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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`. diff --git a/crdt-server/bench.sh b/crdt-server/bench.sh index fc29df0..0f49f00 100755 --- a/crdt-server/bench.sh +++ b/crdt-server/bench.sh @@ -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 ==="