Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计通过

testing-performance测试性能

Agent Skill

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

总安装

356

周安装

15

GitHub Stars

4

下载量

125
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill testing-performance

简介

专注于应用性能问题的诊断与优化建议。

  • 适用于前端加载速度、API 延迟、数据库查询等场景。
  • 可识别代码热点、依赖项性能问题及缓存策略缺陷。
  • 应结合监控数据定位具体性能瓶颈点。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • testing-performance 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

testing-performance

Purpose

This skill enables performance testing using tools like k6, Locust, and JMeter to simulate load, stress, and spike scenarios, measure metrics such as p50/p95/p99 latency, enforce SLAs, and generate flame graphs for bottleneck analysis.

When to Use

Use this skill when assessing application performance under load, identifying scalability issues, validating SLAs, or optimizing code before production. Apply it in pre-release testing, CI/CD pipelines, or when debugging high-latency problems in web services or APIs.

Key Capabilities

  • Run load tests with k6 using VU (virtual users) and duration settings to simulate traffic.
  • Generate reports with metrics like p50 (median), p95 (95th percentile), and p99 latency from test outputs.
  • Define load profiles in Locust via Python scripts for custom user behaviors and ramp-up rates.
  • Enforce SLAs by setting thresholds in JMeter and checking against results.
  • Create flame graphs using integrated profiling in k6 or external tools to visualize CPU/memory usage.
  • Support distributed testing across multiple machines for large-scale simulations.

Usage Patterns

To perform a basic load test, select a tool based on scenario: use k6 for quick scripts, Locust for Python-based customization, or JMeter for complex scenarios with UI elements. Always define a test script first, then run with specified profiles. For CI/CD, integrate as a step that triggers on code changes. Include parameterization for environments (e.g., staging vs. production) and always analyze results post-run. Example: Script a k6 test for an API endpoint, then scale it with Locust for user simulation.

Common Commands/API

For k6, run tests via CLI: k6 run -u 50 -d 1m script.js (sets 50 virtual users for 1 minute). Use thresholds like --threshold p(95)<500 to enforce p95 latency under 500ms. Script example:

import http from 'k6/http';
export default function() { http.get('https://api.example.com'); }

For Locust, start with: locust -f locustfile.py --host https://api.example.com --users 100 --spawn-rate 10 (100 users, 10 per second). Locustfile snippet:

from locust import HttpUser, task
class QuickUser(HttpUser):
    @task
    def endpoint(self): self.client.get("/health")

For JMeter, execute via: jmeter -n -t test_plan.jmx -l results.jtl (non-GUI mode). JMeter config in.jmx XML format includes elements like Thread Group with 50 loops and HTTP Samplers. API endpoints: If testing requires auth, set env vars like $K6_API_KEY in scripts (e.g., export K6_API_KEY=your_key before running).

Integration Notes

Integrate this skill into workflows by wrapping commands in scripts or CI tools like GitHub Actions: e.g., run: k6 run script.js in a YAML step. For cloud services, pass auth via env vars (e.g., $LOCUST_API_TOKEN) to access protected endpoints. Combine with monitoring tools by piping outputs (e.g., k6 JSON results to Prometheus). Ensure tools are installed via package managers (e.g., npm install -g k6 or pip install locust), and use Docker images for consistency (e.g., docker run loadimpact/k6 run - < script.js). If using APIs, endpoints like k6's cloud API require $K6_CLOUD_TOKEN for uploads.

Error Handling

Check exit codes after runs: k6 returns non-zero for failures, e.g., threshold breaches. In scripts, wrap commands with try-catch for Locust (e.g., in Python: try: run_locust() except Exception as e: log(e)). For JMeter, parse.jtl logs for errors like "Assertion failure" and set up listeners to halt on thresholds. Common issues: Handle network errors by adding retries in scripts (e.g., k6: http.get(url, {retries: 3})), and use verbose flags like k6 run --verbose script.js for debugging. If auth fails, verify env vars (e.g., echo $K6_API_KEY before execution).

Concrete Usage Examples

  1. To test an e-commerce API for 100 users over 5 minutes with k6: Write a script with a GET request, then run k6 run -u 100 -d 5m script.js --threshold "http_req_duration{type:200} < 500". Analyze output for p95 latency and ensure SLA compliance.
  2. For simulating user logins with Locust: Create a locustfile.py with tasks for login and browsing, then execute locust -f locustfile.py --host https://app.example.com --users 200 --run-time 10m. Monitor for errors and generate reports to identify bottlenecks.

Graph Relationships

  • Related to: testing (cluster), performance-test (tag), k6 (tag), locust (tag), load-test (tag)
  • Connected via: testing cluster for other testing skills, e.g., unit-testing or integration-testing
  • Dependencies: monitoring skills for metric analysis, deployment skills for environment setup

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

展示第三方安全扫描或审计结果

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

平台分布

Codex

35.66%
按下载量换算45

Claude

33.4%
按下载量换算42

Cursor

19.49%
按下载量换算24

Gemini CLI

9.09%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/alphaonedev/openclaw-graph --skill testing-performance 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills