Add concurrent agent limiting to kugetsu CLI
- Add MAX_CONCURRENT_AGENTS (default: 3) to limit concurrent agents - Implement acquire_agent_slot() and release_agent_slot() with flock - Wrap cmd_start, cmd_continue, and cmd_delegate with slot management - cmd_delegate holds slot until background task completes (fire-and-forget + blocking) - Add basic concurrency tests to test suite
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Parallel Capacity Test Report
|
||||
|
||||
**Generated:** 2026-03-31 03:51:30
|
||||
|
||||
## Summary
|
||||
|
||||
| Agents | Duration | Success | Failed | Timeout | Avg Response | Peak Mem (MB) | Mem/Agent | Cost Score |
|
||||
|--------|----------|---------|--------|---------|--------------|---------------|-----------|------------|
|
||||
| 1 | 1.0s | 0 | 1 | 0 | 0.0s | 2177MB | -0.0MB | 0.00 |
|
||||
| 2 | 1.0s | 0 | 2 | 0 | 0.0s | 2176MB | 0.3MB | 0.00 |
|
||||
| 3 | 1.0s | 0 | 3 | 0 | 0.0s | 2175MB | 0.1MB | 0.00 |
|
||||
| 5 | 1.0s | 0 | 5 | 0 | 0.0s | 2175MB | 0.0MB | 0.00 |
|
||||
| 8 | 1.0s | 0 | 8 | 0 | 0.0s | 2176MB | 0.2MB | 0.00 |
|
||||
|
||||
## Cost Analysis
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Baseline Memory | 2177.1 MB |
|
||||
| Avg Memory per Agent | 0.1 MB |
|
||||
| Memory Limit | 1024 MB |
|
||||
| Estimated Max Capacity | 9729 agents |
|
||||
|
||||
## Key Findings
|
||||
|
||||
## Recommendations
|
||||
|
||||
2. **Monitor closely:** 5+ agents
|
||||
3. **Implement circuit breaker** when failure rate exceeds threshold
|
||||
Reference in New Issue
Block a user