测试81k · #1453
agent-benchmark-suite
它能做什么
这项技能运行性能基准测试,并对比不同时间的结果。适合想衡量速度、规模和资源使用情况,并及早发现变慢问题的开发者。
适用场景
- ✓当用户想衡量吞吐量、延迟或资源使用的时候。
- ✓当用户想知道某次改动是否让系统变慢的时候。
- ✓当用户想比较不同版本之间的性能的时候。
技能链接
https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-benchmark-suite/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/.agents/skills/agent-benchmark-suite/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add ruvnet/ruflo --skill agent-benchmark-suite
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/ruvnet/ruflo/main/.agents/skills/agent-benchmark-suite/SKILL.md -o SKILL.md
可以这样问 AI
“请对这个服务做基准测试,并告诉我最新的改动是否让它变慢了。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会运行吞吐量、延迟、可扩展性和资源使用的基准测试组,以及协调和容错测试。它会把结果与之前的运行进行比较,并报告性能退化。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
name: Benchmark Suite type: agent category: optimization description: Comprehensive performance benchmarking, regression detection and performance validation
Benchmark Suite Agent
Agent Profile
- Name: Benchmark Suite
- Type: Performance Optimization Agent
- Specialization: Comprehensive performance benchmarking and testing
- Performance Focus: Automated benchmarking, regression detection, and performance validation
Core Capabilities
1. Comprehensive Benchmarking Framework
// Advanced benchmarking system
class ComprehensiveBenchmarkSuite {
constructor() {
this.benchmarks = {
// Core performance benchmarks
throughput: new ThroughputBenchmark(),
latency: new LatencyBenchmark(),
scalability: new ScalabilityBenchmark(),
resource_usage: new ResourceUsageBenchmark(),
// Swarm-specific benchmarks
coordination: new CoordinationBenchmark(),
load_balancing: new LoadBalancingBenchmark(),
topology: new TopologyBenchmark(),
fault_tolerance: new FaultToleranceBenchmark(),
// Custom benchmarks
custom: new CustomBenchmarkManager()
};
this.reporter = new BenchmarkReporter();
this.comparator = new PerformanceComparator();
this.analyzer = new BenchmarkAnalyzer();
}
// Execute comprehensive benchmark suite
async runBenchmarkSuite(config = {}) {
const suiteConfig = {
duration: config.duration || 300000, // 5 minutes default
iterations: config.iterations || 10,
warmupTime: config.warmupTime || 30000, // 30 seconds
cooldownTime: config.cooldownTime || 10000, // 10 seconds
parallel: config.parallel || false,
baseline: config.baseline || null
};
const results = {
summary: {},
detailed: new Map(),
baseline_comparison: null,
recommendations: []
};
// Warmup phase
await this.warmup(suiteConfig.warmupTime);
// Execute benchmarks
if (suiteConfig.parallel) {
results.detailed = await this.runBenchmarksParallel(suiteConfig);
} else {
results.detailed = await this.runBenchmarksSequential(suiteConfig);
}
// Generate summary
results.summary = this.generateSummary(results.detailed);
// Compare with baseline if provided
if (suiteConfig.baseline) {
results.baseline_comparison = await this.compareWithBaseline(
results.detailed,
suiteConfig.baseline
);
}
// Generate recommendations
results.recommendations = await this.generateRecommendations(results);
// Cooldown phase
await this.cooldown(suiteConfig.cooldownTime);
return results;
}
// Parallel benchmark execution
async runBenchmarksParallel(config) {
const benchmarkPromises = Object.entries(this.benchmarks).map(
async ([name, benchmark]) => {
const result = await this.executeBenchmark(benchmark, name, config);
return [name, result];
}
);
const results = await Promise.all(benchmarkPromises);
return new Map(results);
}
// Sequential benchmark execution
async runBenchmarksSequential(config) {
const results = new Map();
for (const [name, benchmark] of Object.entries(this.benchmarks)) {
const result = await this.executeBenchmark(benchmark, name, config);
results.set(name, result);
// Brief pause between benchmarks
await this.sleep(1000);
}
return results;
}
}
2. Performance Regression Detection
// Advanced regression detection system
class RegressionDetector {
constructor() {
this.detectors = {
statistical: new StatisticalRegressionDetector(),
machine_learning: new MLRegressionDetector(),
threshold: new ThresholdRegressionDetector(),
trend: new TrendRegressionDetector()
};
this.analyzer = new RegressionAnalyzer();
this.alerting = new RegressionAlerting();
}
// Detect performance regressions
async detectRegressions(currentResults, historicalData, config = {}) {
const regressions = {
detected: [],
severity: 'none',
confidence: 0,
analysis: {}
};
// Run multiple detection algorithms
const detectionPromises = Object.entries(this.detectors).map(
async ([method, detector]) => {
const detection = await detector.detect(currentResults, historicalData, config);
ret
常见问题
它能发现变慢的情况吗?
能。这项技能就是为检测性能退化和比较性能而设计的。
它测量哪些内容?
涵盖吞吐量、延迟、可扩展性、资源使用、协调、负载均衡、拓扑和容错。
我能添加自己的测试吗?
可以。这项技能包含一个自定义基准测试管理器,用于运行你自己的测试。
详情
热度
- GitHub 星标
- 81k
- 排名
- #1453
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
AI 与智能体智能体
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
AI 与智能体智能体
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
AI 与智能体智能体
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。
编程通用编程