performance-testing-standards
БесплатноЗапускает вложенные скриптыНе проверенPerformance testing standards for load, stress, spike, and soak testing. Covers k6 and JMeter implementation, SLI/SLO definitions, CI/CD integration, and…
Об этом скилле
Performance Testing Standards
Level 1: Quick Reference
Core Concepts
Performance Test Types:
- Load Testing: Validate system behavior under expected load
- Stress Testing: Find breaking point and failure modes
- Spike Testing: Validate sudden traffic surge handling
- Soak Testing: Verify stability under sustained load
- Breakpoint Testing: Incrementally increase load to find limits
Key Metrics:
- Latency Percentiles: p50 (median), p95, p99, p99.9
- Throughput: Requests per second (RPS)
- Error Rate: Percentage of failed requests
- Concurrent Users: Virtual users (VUs) active simultaneously
- Resource Utilization: CPU, memory, disk I/O, network
Critical Success Indicators:
- p95 latency < SLO threshold
- Error rate < 0.1%
- System stability during sustained load
- Graceful degradation under stress
- Recovery after traffic spikes
Quick Metrics Reference
| Metric | Good | Warning | Critical |
|---|---|---|---|
| p50 latency | < 100ms | 100-200ms | > 200ms |
| p95 latency | < 500ms | 500-1000ms | > 1000ms |
| p99 latency | < 1s | 1-2s | > 2s |
| Error rate | < 0.1% | 0.1-1% | > 1% |
| CPU usage | < 60% | 60-80% | > 80% |
| Memory usage | < 70% | 70-85% | > 85% |
Quick Start: k6 Load Test
// load-test.js
import http from 'k6/http';
import { check, sleep } from 'k6';
export const options = {
stages: [
{ duration: '2m', target: 50 }, // Ramp-up
{ duration: '5m', target: 50 }, // Steady state
{ duration: '2m', target: 0 }, // Ramp-down
],
thresholds: {
http_req_duration: ['p(95)<500'],
http_req_failed: ['rate<0.01'],
},
};
export default function () {
const res = http.get('https://api.example.com/health');
check(res, {
'status is 200': (r) => r.status === 200,
'response time < 500ms': (r) => r.timings.duration < 500,
});
sleep(1);
}
Run: k6 run load-test.js
Level 2: Implementation Guide
1. Test Strategy & Planning
Define Performance Requirements
# performance-requirements.yaml
service: user-api
environment: production
slis:
availability:
target: 99.9%
latency:
p50: 100ms
p95: 500ms
p99: 1000ms
throughput:
target: 1000 rps
error_rate:
target: 0.1%
critical_user_journeys:
- name: user_login
weight: 30%
slo_p95: 300ms
- name: fetch_dashboard
weight: 40%
slo_p95: 500ms
- name: submit_transaction
weight: 20%
slo_p95: 1000ms
Load Profile Patterns
// 1. Ramp-Up Pattern
export const rampUpOptions = {
stages: [
{ duration: '5m', target: 100 },
{ duration: '10m', target: 100 },
{ duration: '5m', target: 200 },
{ duration: '10m', target: 200 },
{ duration: '5m', target: 0 },
],
};
// 2. Stress Test Pattern
export const stressOptions = {
stages: [
{ duration: '2m', target: 200 },
{ duration: '5m', target: 200 },
{ duration: '2m', target: 400 },
{ duration: '5m', target: 400 },
{ duration: '10m', target: 0 },
],
};
// 3. Spike Test Pattern
export const spikeOptions = {
stages: [
{ duration: '1m', target: 50 },
{ duration: '10s', target: 500 },
{ duration: '3m', target: 500 },
{ duration: '10s', target: 50 },
{ duration: '3m', target: 50 },
],
};
// 4. Soak Test Pattern
export const soakOptions = {
stages: [
{ duration: '5m', target: 100 },
{ duration: '4h', target: 100 },
{ duration: '5m', target: 0 },
],
};
2. k6 Implementation
Advanced Test Structure
import http from 'k6/http';
import { check, group, sleep } from 'k6';
import { Rate, Trend, Counter } from 'k6/metrics';
// Custom metrics
const errorRate = new Rate('errors');
const customTrend = new Trend('custom_duration');
export const options = {
stages: [
{ duration: '2m', target: 100 },
{ duration: '5m', target: 100 },
{ duration: '2m', target: 0 },
],
thresholds: {
'http_req_duration': ['p(95)<500', 'p(99)<1000'],
'http_req_duration{type:api}': ['p(95)<300'],
'http_req_failed': ['rate<0.01'],
'errors': ['rate<0.01'],
},
};
const BASE_URL = __ENV.BASE_URL || 'https://api.example.com';
export function setup() {
const loginRes = http.post(`${BASE_URL}/auth/login`, {
username: 'test-user',
password: 'test-password',
});
return { token: loginRes.json('token') };
}
export default function (data) {
const params = {
headers: {
'Authorization': `Bearer ${data.token}`,
'Content-Type': 'application/json',
},
tags: { type: 'api' },
};
group('Login Flow', () => {
const res = http.get(`${BASE_URL}/api/user/profile`, params);
const success = check(res, {
'status is 200': (r) => r.status === 200,
'has user data': (r) => r.json('id') !== undefined,
});
errorRate.add(!success);
});
sleep(1);
group('Dashboard Load', () => {
const responses = http.batc
Установить performance-testing-standards в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл performance-testing-standards?
Performance testing standards for load, stress, spike, and soak testing. Covers k6 and JMeter implementation, SLI/SLO definitions, CI/CD integration, and bottleneck analysis. Use when validating system behavior under load, establishing baselines, or capacity planning.
Как установить скилл performance-testing-standards?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл performance-testing-standards запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic