From 21ac6c6efa05126841b30ba9635490ebb4acf25e Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 21 Aug 2025 15:04:28 -0400 Subject: [PATCH] Add load_tester and ThreadPipeline.h to docs --- design.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/design.md b/design.md index 3854570..f87538e 100644 --- a/design.md +++ b/design.md @@ -57,6 +57,9 @@ ninja test # or ctest **Debug tools:** - `./debug_arena` - Analyze arena allocator behavior +**Load Testing:** +- `./load_tester` - A tool to generate load against the server for performance and stability analysis. + ### Dependencies **System requirements:** @@ -114,6 +117,15 @@ Ultra-fast memory allocator optimized for request/response patterns: - **Streaming data processing** with partial message handling - **Connection lifecycle hooks** for initialization and cleanup +#### **Thread Pipeline** (`src/ThreadPipeline.h`) + +A high-performance, multi-stage, lock-free pipeline for inter-thread communication. + +- **Lock-Free Design**: Uses a shared ring buffer with atomic counters for coordination, avoiding locks for maximum throughput. +- **Multi-Stage Processing**: Allows items (like connections or data packets) to flow through a series of processing stages (e.g., from I/O threads to worker threads). +- **Batching Support**: Enables efficient batch processing of items to reduce overhead. +- **RAII Guards**: Utilizes RAII (`StageGuard`, `ProducerGuard`) to ensure thread-safe publishing and consumption of items in the pipeline, even in the presence of exceptions. + #### **Parsing Layer** **JSON Commit Request Parser** (`src/json_commit_request_parser.{hpp,cpp}`):