Performance Testing

Performance Testing

Guides an AI agent to design and run performance and load tests with k6, JMeter, JMH and pytest-benchmark, measuring latency, throughput and scalability.

Skill files9 files

references/

scripts/

templates/

SKILL.md103 lines
1
---
2
name: performance-testing
3
description: >
4
Design and execute performance tests to measure response times, throughput,
5
and resource utilization. Use for performance test, load test, JMeter, k6,
6
benchmark, latency testing, and scalability analysis.
7
---
8
9
# Performance Testing
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
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.
22
23
## When to Use
24
25
- Validating response time requirements
26
- Measuring API throughput and latency
27
- Testing database query performance
28
- Identifying performance bottlenecks
29
- Comparing algorithm efficiency
30
- Benchmarking before/after optimizations
31
- Validating caching effectiveness
32
- Testing concurrent user capacity
33
34
## Quick Start
35
36
Minimal working example:
37
38
```javascript
39
// load-test.js
40
import http from "k6/http";
41
import { check, sleep } from "k6";
42
import { Rate, Trend } from "k6/metrics";
43
44
// Custom metrics
45
const errorRate = new Rate("errors");
46
const orderDuration = new Trend("order_duration");
47
48
// Test configuration
49
export const options = {
50
stages: [
51
{ duration: "2m", target: 10 }, // Ramp up to 10 users
52
{ duration: "5m", target: 10 }, // Stay at 10 users
53
{ duration: "2m", target: 50 }, // Ramp up to 50 users
54
{ duration: "5m", target: 50 }, // Stay at 50 users
55
{ duration: "2m", target: 0 }, // Ramp down to 0
56
],
57
thresholds: {
58
http_req_duration: ["p(95)<500"], // 95% of requests under 500ms
59
http_req_failed: ["rate<0.01"], // Error rate under 1%
60
errors: ["rate<0.1"], // Custom error rate under 10%
61
},
62
};
63
64
// ... (see reference guides for full implementation)
65
```
66
67
## Reference Guides
68
69
Detailed implementations in the `references/` directory:
70
71
| Guide | Contents |
72
|---|---|
73
| [k6 for API Load Testing](references/k6-for-api-load-testing.md) | k6 for API Load Testing |
74
| [Apache JMeter](references/apache-jmeter.md) | Apache JMeter |
75
| [pytest-benchmark for Python](references/pytest-benchmark-for-python.md) | pytest-benchmark for Python |
76
| [JMH for Java Benchmarking](references/jmh-for-java-benchmarking.md) | JMH for Java Benchmarking |
77
| [Database Query Performance](references/database-query-performance.md) | Database Query Performance |
78
| [Real-Time Monitoring](references/real-time-monitoring.md) | Real-Time Monitoring |
79
80
## Best Practices
81
82
### ✅ DO
83
84
- Define clear performance requirements (SLAs)
85
- Test with realistic data volumes
86
- Monitor resource utilization
87
- Test caching effectiveness
88
- Use percentiles (P95, P99) over averages
89
- Warm up before measuring
90
- Run tests in production-like environment
91
- Identify and fix N+1 query problems
92
93
### ❌ DON'T
94
95
- Test only with small datasets
96
- Ignore memory leaks
97
- Test in unrealistic environments
98
- Focus only on average response times
99
- Skip database indexing analysis
100
- Test only happy paths
101
- Ignore network latency
102
- Compare without statistical significance
103

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…