Time-Based Benchmarking
Time-Based Benchmarking
Time-based benchmarking runs for a specific duration rather than a fixed number of requests. Use it for SLA validation, stability testing, capacity planning, and A/B comparisons where consistent time windows matter.
Quick Start
Requests are sent continuously until the duration expires. AIPerf then waits for in-flight requests to complete (up to the grace period).
How It Works
- Grace period default: 30 seconds (use
infto wait forever,0for immediate completion) - Responses received within grace period are included in metrics; responses still pending when grace expires are not
--benchmark-grace-period requires --benchmark-duration to be set.
Combining with Request Count
Duration can be combined with count-based stopping—first condition reached wins:
Examples
Stability Test (5 minutes)
Sample Output (Successful Run):
Soak Test (1 hour)
Sample Output (Successful Run):
CLI Reference
Troubleshooting
Related Documentation
- Warmup Phase — Configure pre-benchmark warmup
- User-Centric Timing — Multi-turn benchmarking (auto-sets infinite grace)
- Timing Modes Reference — Complete CLI compatibility matrix