Design and execute performance tests to measure response times, throughput, and resource utilization. Use for performance test, load test, JMeter, k6, benchmark, latency testing, and scalability analysis.
Performance testing measures how systems behave under various load conditions, including response times, throughput, resource utilization, and scalability. It helps identify bottlenecks, validate performance requirements, and ensure systems can handle expected loads.
Minimal working example:
// load-test.js
import http from "k6/http";
import { check, sleep } from "k6";
import { Rate, Trend } from "k6/metrics";
// Custom metrics
const errorRate = new Rate("errors");
const orderDuration = new Trend("order_duration");
// Test configuration
export const options = {
stages: [
{ duration: "2m", target: 10 }, // Ramp up to 10 users
{ duration: "5m", target: 10 }, // Stay at 10 users
{ duration: "2m", target: 50 }, // Ramp up to 50 users
{ duration: "5m", target: 50 }, // Stay at 50 users
{ duration: "2m", target: 0 }, // Ramp down to 0
],
thresholds: {
http_req_duration: ["p(95)<500"], // 95% of requests under 500ms
http_req_failed: ["rate<0.01"], // Error rate under 1%
errors: ["rate<0.1"], // Custom error rate under 10%
},
};
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents | |---|---| | k6 for API Load Testing | k6 for API Load Testing | | Apache JMeter | Apache JMeter | | pytest-benchmark for Python | pytest-benchmark for Python | | JMH for Java Benchmarking | JMH for Java Benchmarking | | Database Query Performance | Database Query Performance | | Real-Time Monitoring | Real-Time Monitoring |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/performance-testing · pinned to the source commit
git clone https://github.com/aj-geddes/useful-ai-prompts.git
cd useful-ai-prompts
git checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills/performance-testing"
cp -r "skills/performance-testing" ".claude/skills/performance-testing"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 3f5182cfd739. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
No static rules matched. This is not a safety guarantee.