Command Palette

Search for a command to run...

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

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от 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
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

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

AGENTS.mdREADME.mdmetadata.jsonrules/_sections.mdrules/_template.mdrules/performance-testing-always-define-thresholds.mdrules/performance-testing-baseline-before-optimizing.mdrules/performance-testing-compare-results-against-previous-runs-to-catch-performance.mdrules/performance-testing-document-performance-baselines-and-slas-in-the-repository.mdrules/performance-testing-ensure-the-load-generator-has-sufficient-resources-cpu.mdrules/performance-testing-export-machine-readable-results-json-jtl-for-trend.mdrules/performance-testing-focus-on-percentiles-p95-p99-not-averages.mdrules/performance-testing-generate-html-reports-for-human-review-gatling-jmeter.mdrules/performance-testing-monitor-the-system-under-test-cpu-memory-db-connections.mdrules/performance-testing-run-full-load-tests-nightly-or-pre-release-comprehensive.mdrules/performance-testing-run-performance-tests-against-a-dedicated-staging.mdrules/performance-testing-run-smoke-tests-on-every-pr-fast-catches-regressions.mdrules/performance-testing-set-thresholds-as-ci-gates.mdrules/performance-testing-start-with-a-smoke-test-minimal-load-to-validate-the-test.mdrules/performance-testing-store-results-as-artifacts-for-trend-analysis-over-time.mdrules/performance-testing-test-the-same-scenario-at-different-load-levels.mdrules/performance-testing-track-error-rate-alongside-response-time.mdrules/performance-testing-use-data-driven-tests-with-csv-feeders-or-dynamic-data.mdrules/performance-testing-use-distributed-load-generation-k6-cloud-jmeter.mdrules/performance-testing-use-realistic-think-times-sleep-pause-to.md

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), без исполняемых скриптов.

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

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