Update comments/docs to match code

This commit is contained in:
2025-09-12 11:40:38 -04:00
parent be5a0c6d8e
commit 674ff581e7
2 changed files with 11 additions and 8 deletions

View File

@@ -55,16 +55,19 @@ ninja test # or ctest
- `./test_http_handler` - HTTP protocol handling tests
- `./test_metric` - Metrics system tests
- `./test_api_url_parser` - API URL parsing tests
- `./test_reference` - Reference counting system tests
- `./test_server_connection_return` - Connection lifecycle tests
**Benchmarking:**
- `./bench_arena` - Memory allocation performance
- `./bench_commit_request` - JSON parsing performance
- `./bench_parser_comparison` - Compare vs nlohmann::json and RapidJSON
- `./bench_metric` - Metrics system performance
- `./bench_thread_pipeline` - Lock-free pipeline performance
- `./bench_cpu_work` - CPU work benchmarking utility
- `./bench_format_comparison` - String formatting performance
- `./bench_metric` - Metrics system performance
- `./bench_parser_comparison` - Compare vs nlohmann::json and RapidJSON
- `./bench_reference` - Reference counting performance
- `./bench_thread_pipeline` - Lock-free pipeline performance
**Debug tools:**
@@ -272,7 +275,7 @@ WeaselDB uses `EPOLLONESHOT` for all connection file descriptors to enable safe
1. **Event Trigger**: Network thread gets epoll event → connection auto-disarmed via ONESHOT
1. **Safe Transfer**: Handler can take ownership (`std::move(conn_ptr)`) with no epoll interference
1. **Async Processing**: Connection processed on handler thread while epoll cannot trigger spurious events
1. **Return & Re-arm**: `Server::receiveConnectionBack()` re-arms fd with `epoll_ctl(EPOLL_CTL_MOD)`
1. **Return & Re-arm**: Internal server method re-arms fd with `epoll_ctl(EPOLL_CTL_MOD)` via `Server::release_back_to_server()`
**Performance Trade-off:**
@@ -475,7 +478,7 @@ public:
}
void on_write_progress(std::unique_ptr<Connection> &conn) override {
if (conn->outgoingBytesQueued() == 0) {
if (conn->outgoing_bytes_queued() == 0) {
// Don't use an unbounded amount of memory
conn->reset();
// Write "y\n" repeatedly