Use Cases
- Compare performance against baselines
- Detect performance regressions
- Monitor response time trends
- Validate performance after deployments
Simple Implementation
Setup Instructions
- Establish performance baselines by running tests on a known good version
- Update the baselines dictionary with your actual baseline metrics
- Adjust regression thresholds based on your performance requirements
- Configure endpoints to match your application’s API structure
What This Tests
- Response Time Baselines: Compare current performance against established baselines
- Regression Detection: Identify when performance degrades beyond acceptable thresholds
- Percentile Analysis: Monitor P95 and P99 response times for outliers
- Concurrent Performance: Test performance under concurrent load
- Health Scoring: Overall performance health assessment
Performance Metrics
- Average Response Time: Mean response time across all requests
- P95 Response Time: 95th percentile response time
- P99 Response Time: 99th percentile response time
- Regression Percentage: Percentage increase from baseline
- Health Score: Percentage of endpoints performing within acceptable limits
Regression Thresholds
Configure thresholds for different metrics:- Average: 20% increase triggers regression alert
- P95: 25% increase triggers regression alert
- P99: 30% increase triggers regression alert
- Critical: 2x baseline triggers critical alert
Best Practices
- Establish Baselines: Run tests on known good versions to establish baselines
- Regular Updates: Update baselines when intentional performance changes are made
- Multiple Metrics: Monitor average, P95, and P99 response times
- Trend Analysis: Look for gradual degradation over time
- Environment Consistency: Run regression tests in consistent environments
Common Causes of Regression
- Code Changes: New features or refactoring introducing inefficiencies
- Database Changes: Schema changes or missing indexes
- Infrastructure Changes: Resource constraints or configuration changes
- External Dependencies: Third-party service performance degradation
- Data Growth: Increased data volume affecting query performance