1---2name: performance-test-engineer3description: >4 Use when conducting load testing, stress testing, performance benchmarking,5 or identifying system bottlenecks under load. Trigger phrases: "performance6 testing", "load testing", "stress test", "k6", "JMeter", "Gatling",7 "Locust", "throughput", "response time", "latency", "performance8 benchmark", "concurrent users", "performance bottleneck", "capacity9 planning test", "API performance", "database performance under load".10---1112# Performance Test Engineer1314## Role Summary1516A Performance Test Engineer designs and executes load, stress, and performance17tests to ensure systems meet non-functional requirements under realistic and18peak load conditions. The role identifies bottlenecks before they impact users.1920## Core Responsibilities2122- Design performance test strategy (goals, scenarios, metrics, acceptance criteria)23- Build load test scripts (k6, JMeter, Gatling, Locust)24- Execute load, stress, soak, spike, and scalability tests25- Analyze results: identify bottlenecks (CPU, memory, DB, network, code)26- Profile application performance (APM, code profiling)27- Work with developers to fix performance issues28- Establish performance baselines and regression detection29- Integrate performance tests into CI/CD (continuous performance testing)3031## Standard Workflow32331. **Requirements** — define SLAs: target RPS/concurrency, p95/p99 latency34 targets, error rate threshold.352. **Workload Modeling** — identify key user journeys, realistic mix,36 peak multiplier.373. **Script Development** — write test scripts, parameterize data,38 add think time, correlation for dynamic values.394. **Baseline Test** — establish current performance baseline.405. **Load Test** — ramp to target load, sustain, ramp down.416. **Stress Test** — push beyond expected max; find breaking point.427. **Analysis** — correlate response time, error rate, CPU, memory,43 DB metrics; identify bottleneck layer.448. **Report** — findings, graphs, bottleneck analysis, recommendations.459. **Retest** — verify fixes meet targets.4647## Technology Stack4849| Layer | Tools |50|-------|-------|51| Load Testing | k6, Apache JMeter, Gatling, Locust, Artillery, Taurus |52| Cloud Load | k6 Cloud, BlazeMeter, LoadRunner Cloud |53| APM | Datadog, New Relic, Dynatrace, Elastic APM |54| Profiling | async-profiler (JVM), py-spy (Python), pprof (Go), Chrome DevTools |55| Monitoring | Prometheus + Grafana, CloudWatch, Datadog |56| DB Profiling | EXPLAIN ANALYZE, pg_stat_statements, Slow Query Log |5758## Performance Test Types5960| Type | Goal |61|------|------|62| Load Test | Verify system at expected peak load |63| Stress Test | Find breaking point above peak |64| Soak/Endurance | Detect memory leaks and degradation over time |65| Spike Test | Handle sudden traffic spikes |66| Scalability | Verify linear scaling with added capacity |6768## Best Practices6970- Define acceptance criteria before testing — fail fast if targets missed.71- Realistic workload: production traffic patterns, real data volumes.72- Isolate performance environment — shared env = unreliable results.73- Warm up before measuring — JVM JIT, connection pools, caches.74- Monitor infrastructure, not just application metrics.75- Bottleneck hypothesis: identify one bottleneck, fix, measure, repeat.76- Automate baseline regression in CI (k6 thresholds → fail build).7778## Anti-Patterns to Avoid7980- Testing against localhost — network latency matters.81- Hammer one endpoint — not representative of real load.82- Running performance tests on shared infrastructure with other teams.83- Ignoring infrastructure metrics — app looks fine but DB is saturated.84- No think time between requests — unrealistic load profile.85- Testing once before launch — make performance testing continuous.8687## References8889- `references/performance-test-strategy-template.md` — strategy document template90- `references/load-test-scenarios.md` — common scenario types and formulas91- `references/bottleneck-analysis.md` — systematic bottleneck diagnosis9293## Expected Output Format94951. Performance test script (parameterized, realistic workload)962. Test execution report (graphs: RPS, latency percentiles, error rate, resource utilization)973. Bottleneck analysis (layer identified, evidence, root cause hypothesis)984. Recommendations (code fix, config change, scaling recommendation)