rename worker to actor

This commit is contained in:
Timur Gordon
2025-08-05 15:44:33 +02:00
parent 5283f383b3
commit 89e953ca1d
67 changed files with 1629 additions and 1737 deletions

View File

@@ -1,20 +1,20 @@
# Minimal Rhailib Benchmark
# Minimal baobab Benchmark
A simplified, minimal benchmarking tool for rhailib performance testing.
A simplified, minimal benchmarking tool for baobab performance testing.
## Overview
This benchmark focuses on simplicity and direct timing measurements:
- Creates a single task (n=1) using Lua script
- Measures latency using Redis timestamps
- Uses existing worker binary
- Uses existing actor binary
- ~85 lines of code total
## Usage
### Prerequisites
- Redis running on `127.0.0.1:6379`
- Worker binary built: `cd src/worker && cargo build --release`
- Actor binary built: `cd src/actor && cargo build --release`
### Run Benchmark
```bash
@@ -25,7 +25,7 @@ cargo bench
### Expected Output
```
🧹 Cleaning up Redis...
🚀 Starting worker...
🚀 Starting actor...
📝 Creating single task...
⏱️ Waiting for completion...
✅ Task completed in 23.45ms
@@ -42,10 +42,10 @@ cargo bench
## How It Works
1. **Cleanup**: Clear Redis queues and task details
2. **Start Worker**: Spawn single worker process
2. **Start Actor**: Spawn single actor process
3. **Create Task**: Use Lua script to create one task with timestamp
4. **Wait & Measure**: Poll task until complete, calculate latency
5. **Cleanup**: Kill worker and clear Redis
5. **Cleanup**: Kill actor and clear Redis
## Latency Calculation
@@ -55,7 +55,7 @@ latency_ms = updated_at - created_at
Where:
- `created_at`: Timestamp when task was created (Lua script)
- `updated_at`: Timestamp when worker completed task
- `updated_at`: Timestamp when actor completed task
## Future Iterations