| name | performance-testing |
| description | Use this skill when writing, reviewing, or planning performance and load tests. Covers page load metrics (LCP, FCP), memory leak detection, API response time profiling, load testing with k6/Artillery/Playwright, concurrent user simulation, and performance baseline tracking. Trigger when the user mentions performance testing, load testing, benchmarks, response times, or scalability testing. |
Performance & Load Testing Skill
A reference for GitHub Copilot to generate performance benchmarks and load tests.
Performance Testing
When to use: Measuring response times, resource usage, and identifying bottlenecks.
Prompting patterns:
Write a performance test that:
- Measures page load time for [page] across viewport sizes
- Checks Largest Contentful Paint (LCP) stays under 2.5s
- Verifies no memory leaks during [repeated action]
- Profiles API response times under normal load
Load Testing
When to use: Verifying the system handles expected and peak traffic.
Prompting patterns:
Write a load test using [k6/Artillery/Playwright] that:
- Simulates [N] concurrent users over [duration]
- Ramps up gradually to identify the breaking point
- Measures p50, p95, p99 response times
- Monitors error rates under load
- Tests [specific endpoint or user flow]
Best Practices
- Establish baselines before optimizing
- Test against realistic data volumes
- Include think time between actions to simulate real users
- Monitor server-side metrics (CPU, memory, DB connections) alongside client metrics
- Run performance tests in an environment that mirrors production
- Track performance metrics over time to catch regressions
- Test both cold starts and warm cache scenarios
- Set clear pass/fail thresholds (e.g., p95 < 500ms, error rate < 1%)