Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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…

williamzujkowskiот williamzujkowski★ 23 звезды на GitHub14 установок в других каталогах

Об этом скилле

Performance Testing Standards

Level 1: Quick Reference

Core Concepts

Performance Test Types:

  1. Load Testing: Validate system behavior under expected load
  2. Stress Testing: Find breaking point and failure modes
  3. Spike Testing: Validate sudden traffic surge handling
  4. Soak Testing: Verify stability under sustained load
  5. 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
Полный SKILL.md на GitHub

Установить performance-testing-standards в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

REFERENCE.mdconfig/jmeter-test-plan.jmxresources/README.mdresources/performance-checklist.mdscripts/README.mdscripts/run-perf-tests.shtemplates/README.mdtemplates/grafana-dashboard.jsontemplates/k6-load-test.jstemplates/k6-stress-test.js

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить performance-testing-standards с