performance-testing
БесплатноБез исполняемых скриптовНе проверенUse for load, stress, and scalability testing of applications and APIs. Covers k6 (Grafana), JMeter, Gatling, Artillery, and Lighthouse for web performance…
от onfire7777★ 17 звёзд на GitHubОб этом скилле
Performance Testing
Overview
Performance testing validates that your application meets speed, stability, and scalability requirements under expected and extreme conditions. It answers questions like "How many concurrent users can we handle?", "What's the 99th percentile response time?", and "Where does the system break?".
Performance Test Types
| Type | Goal | Pattern | When to Use |
|---|---|---|---|
| Load | Validate expected traffic | Ramp to target VUs, sustain, ramp down | Before release, capacity planning |
| Stress | Find the breaking point | Ramp beyond expected capacity | Pre-launch, architecture validation |
| Spike | Handle sudden traffic bursts | Jump to high VUs instantly | Flash sales, event-driven traffic |
| Soak | Detect memory leaks / degradation | Moderate load over hours | After major changes, long-running services |
| Breakpoint | Determine absolute maximum | Continuously increase until failure | Capacity planning, SLA definition |
Key Metrics
| Metric | Description | Typical Thresholds |
|---|---|---|
| Response Time (p50) | Median latency | < 200ms for APIs, < 1s for pages |
| Response Time (p95) | 95th percentile latency | < 500ms for APIs, < 3s for pages |
| Response Time (p99) | 99th percentile latency | < 1s for APIs, < 5s for pages |
| Throughput (RPS) | Requests per second | Application-specific |
| Error Rate | % of failed requests | < 1% under normal load |
| VU Concurrency | Active virtual users | Application-specific |
| TTFB | Time to first byte | < 200ms |
| Core Web Vitals (LCP) | Largest Contentful Paint | < 2.5s |
| Core Web Vitals (INP) | Interaction to Next Paint | < 200ms |
| Core Web Vitals (CLS) | Cumulative Layout Shift | < 0.1 |
Cross-Platform Tools
| Tool | Language | Strengths |
|---|---|---|
| k6 (Grafana) | JavaScript | Developer-friendly, CLI-native, thresholds, scenarios, k6 cloud, k6 browser |
| JMeter | Java (GUI + CLI) | Mature, GUI test plan builder, extensive protocol support, plugins |
| Gatling | Scala / Java | High performance, code-based DSL, detailed HTML reports |
| Artillery | YAML + JS | Simple YAML config, plugin ecosystem, serverless mode |
| Lighthouse | CLI / Chrome | Web performance audits, Core Web Vitals, accessibility, SEO |
k6 (Grafana)
Load Test with Stages, Thresholds, and Checks
// tests/performance/load-test.k6.js
import http from "k6/http";
import { check, sleep, group } from "k6";
export const options = {
stages: [
{ duration: "2m", target: 50 }, // Ramp up to 50 VUs
{ duration: "5m", target: 50 }, // Sustain 50 VUs
{ duration: "2m", target: 100 }, // Ramp up to 100 VUs
{ duration: "5m", target: 100 }, // Sustain 100 VUs
{ duration: "2m", target: 0 }, // Ramp down
],
thresholds: {
http_req_duration: [
"p(50)<200", // 50th percentile under 200ms
"p(95)<500", // 95th percentile under 500ms
"p(99)<1000", // 99th percentile under 1s
],
http_req_failed: ["rate<0.01"], // Less than 1% errors
checks: ["rate>0.99"], // 99%+ checks pass
},
};
const BASE_URL = __ENV.BASE_URL || "http://localhost:3000";
export default function () {
group("Homepage flow", () => {
const homeRes = http.get(`${BASE_URL}/`);
check(homeRes, {
"homepage returns 200": (r) => r.status === 200,
"homepage loads under 500ms": (r) => r.timings.duration < 500,
});
const apiRes = http.get(`${BASE_URL}/api/products?limit=20`);
check(apiRes, {
"products API returns 200": (r) => r.status === 200,
"products returns array": (r) => Array.isArray(r.json()),
});
});
sleep(1); // Think time between iterations
}
k6 Scenarios (Advanced)
// tests/performance/scenarios.k6.js
import http from "k6/http";
import { check } from "k6";
export const options = {
scenarios: {
// Constant arrival rate — fixed RPS regardless of response time
constant_load: {
executor: "constant-arrival-rate",
rate: 100, // 100 RPS
timeUnit: "1s",
duration: "5m",
preAllocatedVUs: 50,
maxVUs: 200,
},
// Ramping VUs — gradual increase
ramping_users: {
executor: "ramping-vus",
startVUs: 0,
stages: [
{ duration: "2m", target: 50 },
{ duration: "3m", target: 50 },
{ duration: "1m", target: 0 },
],
},
// Spike test — sudden burst
spike: {
executor: "ramping-arrival-rate",
startRate: 10,
timeUnit: "1s",
stages: [
{ duratio
Установить performance-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл performance-testing?
Use for load, stress, and scalability testing of applications and APIs. Covers k6 (Grafana), JMeter, Gatling, Artillery, and Lighthouse for web performance audits. Includes test type definitions, key metrics, thresholds, CI integration patterns, and performance budgets. USE FOR: k6, JMeter, Gatling, Artillery, Lighthouse, load testing, stress testing, performance benchmarks, Core Web Vitals, throughput testing, spike testing, soak testing, capacity planning, performance budgets DO NOT USE FOR: functional API testing (use api-testing), browser E2E tests (use e2e-testing), visual regression (use visual-testing)
Как установить скилл performance-testing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл performance-testing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic