Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

performance-testing性能测试

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

449

周安装

18

GitHub Stars

公开资料未说明

下载量

145
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:performance-testing(性能测试)
来源仓库:https://github.com/yonatangross/skillforge-claude-plugin
仓库路径:skills/performance-testing
安装命令:
npx skills add yonatangross/skillforge-claude-plugin --skill "performance-testing"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add yonatangross/skillforge-claude-plugin --skill "performance-testing"

简介

用于辅助测试设计、自动化测试与回归验证流程。

  • 适合让 Agent 编写单元测试、端到端测试或根据失败日志定位问题。
  • 使用时需确认项目测试框架、运行命令和夹具数据,避免误改真实逻辑。
  • 涉及浏览器或外部服务时,应区分本地模拟与生产环境边界。
  • performance-testing 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Performance Testing

Validate system behavior under load.

k6 Load Test (JavaScript)

import http from 'k6/http';
import { check, sleep } from 'k6';

export const options = {
  stages: [
    { duration: '30s', target: 20 },  // Ramp up
    { duration: '1m', target: 20 },   // Steady
    { duration: '30s', target: 0 },   // Ramp down
  ],
  thresholds: {
    http_req_duration: ['p(95)<500'],  // 95% under 500ms
    http_req_failed: ['rate<0.01'],    // <1% errors
  },
};

export default function () {
  const res = http.get('http://localhost:8500/api/health');

  check(res, {
    'status is 200': (r) => r.status === 200,
    'response time < 200ms': (r) => r.timings.duration < 200,
  });

  sleep(1);
}

Locust Load Test (Python)

from locust import HttpUser, task, between

class APIUser(HttpUser):
    wait_time = between(1, 3)

    @task(3)
    def get_analyses(self):
        self.client.get("/api/analyses")

    @task(1)
    def create_analysis(self):
        self.client.post(
            "/api/analyses",
            json={"url": "https://example.com"}
        )

    def on_start(self):
        """Login before tasks."""
        self.client.post("/api/auth/login", json={
            "email": "test@example.com",
            "password": "password"
        })

Test Types

Load Test

// Normal expected load
export const options = {
  vus: 50,           // Virtual users
  duration: '5m',    // Duration
};

Stress Test

// Find breaking point
export const options = {
  stages: [
    { duration: '2m', target: 100 },
    { duration: '2m', target: 200 },
    { duration: '2m', target: 300 },
    { duration: '2m', target: 400 },
  ],
};

Spike Test

// Sudden traffic surge
export const options = {
  stages: [
    { duration: '10s', target: 10 },
    { duration: '1s', target: 1000 },  // Spike!
    { duration: '3m', target: 1000 },
    { duration: '10s', target: 10 },
  ],
};

Soak Test

// Sustained load (memory leaks)
export const options = {
  vus: 50,
  duration: '4h',
};

Metrics to Track

import { Trend, Counter, Rate } from 'k6/metrics';

const responseTime = new Trend('response_time');
const errors = new Counter('errors');
const successRate = new Rate('success_rate');

export default function () {
  const start = Date.now();
  const res = http.get('http://localhost:8500/api/data');

  responseTime.add(Date.now() - start);

  if (res.status !== 200) {
    errors.add(1);
    successRate.add(false);
  } else {
    successRate.add(true);
  }
}

CI Integration

# GitHub Actions
- name: Run k6 load test
  run: |
    k6 run --out json=results.json tests/load/api.js

- name: Check thresholds
  run: |
    if [ $(jq '.thresholds | .[] | select(.ok == false)' results.json | wc -l) -gt 0 ]; then
      exit 1
    fi

Key Decisions

DecisionRecommendation
Toolk6 (JS), Locust (Python)
Load profileStart with expected traffic
Thresholdsp95 < 500ms, errors < 1%
Duration5-10 min for load, 4h+ for soak

Common Mistakes

  • Testing against production without protection
  • No warmup period
  • Unrealistic load profiles
  • Missing error rate thresholds

Related Skills

  • observability-monitoring - Metrics collection
  • performance-optimization - Fixing bottlenecks
  • e2e-testing - Functional validation

Capability Details

load-testing

Keywords: load test, concurrent users, k6, Locust, ramp up Solves:

  • Simulate concurrent user load
  • Configure ramp-up patterns
  • Test system under expected load

stress-testing

Keywords: stress test, breaking point, peak load, overload Solves:

  • Find system breaking points
  • Test beyond expected capacity
  • Identify failure modes under stress

latency-measurement

Keywords: latency, response time, p95, p99, percentile Solves:

  • Measure response time percentiles
  • Track latency distribution
  • Set latency SLO thresholds

throughput-testing

Keywords: throughput, requests per second, RPS, TPS Solves:

  • Measure maximum throughput
  • Test transactions per second
  • Verify capacity requirements

bottleneck-identification

Keywords: bottleneck, profiling, hot path, performance issue Solves:

  • Identify performance bottlenecks
  • Profile critical code paths
  • Diagnose slow operations

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

31.15%
按下载量换算45

OpenCode

21.42%
按下载量换算31

Antigravity

19.02%
按下载量换算28

Gemini CLI

13.8%
按下载量换算20

windsurf

8.31%
按下载量换算12

trae

3.21%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills