Minimal baobab Benchmark
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 actor binary
 - ~85 lines of code total
 
Usage
Prerequisites
- Redis running on 
127.0.0.1:6379 - Actor binary built: 
cd src/actor && cargo build --release 
Run Benchmark
# From project root
cargo bench
Expected Output
🧹 Cleaning up Redis...
🚀 Starting actor...
📝 Creating single task...
⏱️  Waiting for completion...
✅ Task completed in 23.45ms
🧹 Cleaning up...
Files
simple_bench.rs- Main benchmark binary (85 lines)batch_task.lua- Minimal Lua script for task creation (28 lines)Cargo.toml- Dependencies and binary configurationREADME.md- This file
How It Works
- Cleanup: Clear Redis queues and task details
 - Start Actor: Spawn single actor process
 - Create Task: Use Lua script to create one task with timestamp
 - Wait & Measure: Poll task until complete, calculate latency
 - Cleanup: Kill actor and clear Redis
 
Latency Calculation
latency_ms = updated_at - created_at
Where:
created_at: Timestamp when task was created (Lua script)updated_at: Timestamp when actor completed task
Future Iterations
- Iteration 2: Small batches (n=5, n=10)
 - Iteration 3: Larger batches and script complexity
 - Iteration 4: Performance optimizations
 
Benefits
- Easy to Understand: Single file, linear flow
 - Direct Timing: Redis timestamps, no complex stats
 - Fast to Modify: No abstractions or frameworks
 - Reliable: Simple Redis operations