Performance Testing Basics
Key Metrics: Throughput, Latency, P95
Key Metrics: Throughput, Latency, P95
Performance testing produces many numbers. Three metrics drive most decisions: throughput, latency, and percentile response times.
Throughput
Definition: Number of requests the system processes per unit time. Units: Requests per second (rps), transactions per second (tps).
High throughput is good. A falling throughput under constant load is a sign the system is degrading — likely due to resource exhaustion (CPU, memory, DB connections).
Latency / Response Time
Definition: Time from sending a request to receiving the complete response.
Report multiple values — the average alone is misleading:
| Metric | What it tells you |
|---|---|
| Average | The typical user experience |
| Median (P50) | 50% of requests are faster than this |
| P90 | 90% of requests are faster than this |
| P95 | 95% of requests are faster than this |
| P99 | 99% of requests are faster than this |
| Max | The single worst request in the test run |
Why Percentiles Matter More Than Averages
Imagine 100 requests: 99 complete in 100ms, 1 takes 10,000ms. The average is ~200ms — looks reasonable. The P99 is 10,000ms — that one user had a terrible experience.
Google's research shows that if a page takes >400ms, 1% of users abandon. Performance SLAs should be expressed as percentiles, not averages.
A common SLA: "P95 < 500ms at 100 concurrent users."
Error Rate
Definition: Percentage of requests that fail (any status 4xx or 5xx, or timeout).
Error rate should be 0% at normal load. Even 1% at peak load warrants investigation — at 10,000 rps, that is 100 failed requests per second.
Reading JMeter's Summary Report
| Column | Meaning |
|---|---|
| Samples | Total requests sent |
| Average | Mean response time (ms) |
| Min/Max | Fastest/slowest request |
| Std Dev | Variability — high std dev means inconsistent performance |
| Error% | % of requests that failed |
| Throughput | Requests per second |
| Received KB/sec | Network bandwidth consumed |
An API processes 1000 requests in a load test. The average response time is 200ms but the P99 is 8000ms. What should you investigate?
Next Lesson
JMeter Installation & GUI Overview