mcpField
P
performance-testing

performance-testing

github.com/aj-geddesTesting & quality374606 installsUpdated 34w ago
Repository

About performance-testing

A reference skill for planning performance tests and interpreting system behavior under load. It covers API, database, and algorithm measurements with guides for several testing tools.

Key features

  1. 01API load and latency testing
  2. 02Database query performance
  3. 03k6, JMeter, pytest-benchmark, and JMH guides
  4. 04Monitoring and bottleneck analysis

Use cases

  1. 01Check response-time and throughput requirements
  2. 02Test capacity under concurrent users
  3. 03Compare performance before and after optimization

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill performance-testing

After installing, type/performance-testingin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
apache-jmeter.md
database-query-performance.md
jmh-for-java-benchmarking.md
k6-for-api-load-testing.md
pytest-benchmark-for-python.md
real-time-monitoring.md
scripts/
validate-api.sh
templates/
api-scaffold.yaml

Details

From the project README

Performance Testing

Table of Contents

Overview

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.

When to Use

  • Validating response time requirements
  • Measuring API throughput and latency
  • Testing database query performance
  • Identifying performance bottlenecks
  • Comparing algorithm efficiency
  • Benchmarking before/after optimizations
  • Validating caching effectiveness
  • Testing concurrent user capacity

Quick Start

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)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
k6 for API Load Testingk6 for API Load Testing
Apache JMeterApache JMeter
pytest-benchmark for Pythonpytest-benchmark for Python
JMH for Java BenchmarkingJMH for Java Benchmarking
Database Query PerformanceDatabase Query Performance
Real-Time MonitoringReal-Time Monitoring

Best Practices

✅ DO
  • Define clear performance requirements (SLAs)
  • Test with realistic data volumes
  • Monitor resource utilization
  • Test caching effectiveness
  • Use percentiles (P95, P99) over averages
  • Warm up before measuring
  • Run tests in production-like environment
  • Identify and fix N+1 query problems
❌ DON'T
  • Test only with small datasets
  • Ignore memory leaks
  • Test in unrealistic environments
  • Focus only on average response times
  • Skip database indexing analysis
  • Test only happy paths
  • Ignore network latency
  • Compare without statistical significance

Comments

Markdown supported