Rationale
GitLab requires performance testing to ensure features meet latency and throughput requirements before production deployment.
Requirements
- Performance-sensitive features must have load tests
- API response times must meet SLA:
- P50 < 100ms
- P95 < 500ms
- P99 < 1000ms
- Database queries must complete within:
- Simple queries: < 50ms
- Complex queries: < 200ms
- Performance regression tests must run in CI
Testing Types
| Type | Purpose | Frequency |
|---|---|---|
| Load Testing | Normal traffic simulation | On PR |
| Stress Testing | Breaking point discovery | Pre-release |
| Soak Testing | Memory leak detection | Nightly |
| Spike Testing | Traffic burst handling | Pre-release |
Metrics to Track
- Response time (P50, P95, P99)
- Throughput (requests/second)
- Error rate under load
- Resource utilization (CPU, memory, DB connections)
References
- Performance Testing: https://handbook.gitlab.com/handbook/engineering/testing/performance/
- PREP Metrics: https://handbook.gitlab.com/handbook/engineering/testing/performance/prep/