Skip to content

Performance Testing

Performance testing answers one question: does the system behave correctly under load?

This section covers the full spectrum — from theory to Locust tooling.


Structure

1. Fundamentals & Metrics

File Topics
Goals & Types Performance testing goals, load/stress/spike/soak/scalability types
Core Metrics Latency (p50/p95/p99), throughput, error rate, concurrency
Metric Relationships How metrics interact, bottleneck signals, capacity planning

2. Locust

File Topics
Architecture & Basics Locust architecture, setup, basic load test structure
Load Modeling User classes, wait times, task weights, ramp-up patterns
Test Design Scenario design, data handling, correlation, assertions
Metrics & Analysis Interpreting Locust output, charts, CSV export, dashboards
Advanced Usage Distributed mode, custom clients, event hooks, CI integration

3. Bottlenecks & Monitoring

File Topics
Bottlenecks CPU, memory, I/O, network, DB, connection pool bottlenecks
Monitoring & Observability Metrics collection, Grafana, Prometheus, alerting patterns

4. Execution & Results

File Topics
SLA / SLO SLA vs SLO vs SLI, defining targets, error budgets
Execution Strategy Environment prep, baseline, incremental load, test schedule
Interpreting Results Reading reports, comparing runs, identifying regressions
Pitfalls & Heuristics Common mistakes, unrealistic scenarios, anti-patterns

When to Apply Which Test Type

Situation Test Type
Regular deploy validation Load test
Finding system limits Stress test
Flash sale, viral traffic Spike test
Memory leaks, long sessions Soak test
Horizontal scaling plan Scalability test

Key Principle

Always analyze p95/p99. Average latency hides the pain of real users.


See also